From 8920def09dc831cb3499b41f6df4bc1a4687a641 Mon Sep 17 00:00:00 2001 From: Toki Date: Sun, 26 Jan 2025 18:11:12 +0900 Subject: [PATCH] update scheduler --- assets/scheduler.yaml | 115 +++++++++++++++++++++++++++++++++++------- 1 file changed, 96 insertions(+), 19 deletions(-) diff --git a/assets/scheduler.yaml b/assets/scheduler.yaml index 416713b..81ac15a 100644 --- a/assets/scheduler.yaml +++ b/assets/scheduler.yaml @@ -1,38 +1,115 @@ --- scheduler: - alias: test - # cron: '* * * * *' - interval: 60000 # ms + alias: darksoulIII + cron: '* * * * *' + # interval: 10000 # ms enableLog: true # (Optional) default: false property: - workspace: /home/deck/work/oto_cli - + workspace: /home/deck/.steam/steam/steamapps/compatdata/374320/pfx/drive_c/users/steamuser/AppData/Roaming/DarkSoulsIII + saveFolder: /01100001112a7a14 + savePath: /DS30000.sl2 pipeline: id: main workflow: + - exe: read-web + - exe: json-read-web + - exe: json-read-local - exe: diff - - if: - condition-bool: == true + - if: + condition-bool: == true on-true: - - exe: shell - + - exe: info + - if: + condition-date: < + on-true: + - exe: json-write-local + - exe: upload + - if: + condition-date: > + on-true: + - exe: json-write-web + - exe: download + commands: +- command: FileInfo + id: info + param: + path: + setInfo: <@property.info> + +- command: WebRequest + id: read-web + param: + url: https://toki-labs.com/cdn/save/darksoulIII/save.json + setResponse: <@property.web> + +- command: JsonReader + id: json-read-web + param: + json: + pair: + - from: lastSaved + setValue: <@property.lastSavedWeb> + +- command: JsonReaderFile + id: json-read-local + param: + path: /save.json + pair: + - from: lastSaved + setValue: <@property.lastSavedLocal> + +- command: Print + id: print + param: + message: change save file + - command: FileDiffCheck id: diff param: - paths: - - /lib/oto/data/command_data.dart - - /lib/oto/data/jenkins_data.dart - - /lib/oto/data/jira_data.dart - - /lib/oto/data/pipeline_data.dart - setDiff: <@property.isDiff> + paths: + - + setDiff: <@property.diff> -- command: Shell - id: shell +- command: JsonWriterFile + id: json-write-local param: - commands: - - flutter pub run build_runner build --delete-conflicting-outputs \ No newline at end of file + path: /save.json + pair: + - from: lastSaved + value: + +- command: Upload + id: upload + param: + sftp: true + port: 22 + host: toki-labs.com + user: toki + password: r0bins + map: + : /Users/toki/docker/nginx/home/cdn/save/darksoulIII + /save.json : /Users/toki/docker/nginx/home/cdn/save/darksoulIII + +- command: JsonWriterFile + id: json-write-web + param: + path: /save.json + pair: + - from: lastSaved + value: + +- command: Download + id: download + param: + sftp: true + port: 22 + host: toki-labs.com + user: toki + password: r0bins + map: + /Users/toki/docker/nginx/home/cdn/save/darksoulIII/DS30000.sl2 : \ No newline at end of file