Skip to content

Commit

Permalink
Switch to cron job #48
Browse files Browse the repository at this point in the history
  • Loading branch information
dievri committed Jan 10, 2021
1 parent 004bd1b commit ddcbd1a
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/download.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# This workflow containts jobs for downloading player data
name: Player Data Downloader
on:
workflow_dispatch:
inputs:
first_id:
description: 'First Player ID'
required: false
default: 30000
last_id:
description: 'Last Player ID'
required: false
default: 30100
threads:
description: 'Number of Execution Threads'
required: false
default: 10
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/5 * * * *'
# workflow_dispatch:
# inputs:
# first_id:
# description: 'First Player ID'
# required: false
# default: 30000
# last_id:
# description: 'Last Player ID'
# required: false
# default: 30100
# threads:
# description: 'Number of Execution Threads'
# required: false
# default: 10

jobs:
download:
Expand Down Expand Up @@ -49,7 +52,7 @@ jobs:
# Run Player Data Downloader with inputs provided from dispatch if present
# or run with defaults and save into data directory
- name: Download Data
run: java -Dlog4j.configurationFile=log4j2.xml -cp kgparserSrv/target/kgparser-srv-1.0.jar ru.klavogonki.kgparser.PlayerDataDownloader data ${{ github.event.inputs.first_id }} ${{ github.event.inputs.last_id }} ${{ github.event.inputs.threads }}
run: java -Dlog4j.configurationFile=log4j2.xml -cp kgparserSrv/target/kgparser-srv-1.0.jar ru.klavogonki.kgparser.PlayerDataDownloader data 30000 30100 10

# Archive all downloaded .json files
- name: Archive Data
Expand Down

0 comments on commit ddcbd1a

Please sign in to comment.