Merge branch 'main' into main
This commit is contained in:
commit
7eb708d4e5
2 changed files with 10 additions and 8 deletions
8
.github/workflows/get_context.yml
vendored
8
.github/workflows/get_context.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Get latest release
|
- name: Get latest release
|
||||||
run: |
|
run: |
|
||||||
curl -s https://api.github.com/repos/nanos/mastodon_get_replies/releases/latest | jq .zipball_url | xargs wget -O download.zip
|
curl --retry 20 -s https://api.github.com/repos/nanos/mastodon_get_replies/releases/latest | jq .zipball_url | xargs wget -O download.zip
|
||||||
unzip -j download.zip
|
unzip -j download.zip
|
||||||
mkdir artifacts
|
mkdir artifacts
|
||||||
ls -lR
|
ls -lR
|
||||||
|
@ -39,5 +39,7 @@ jobs:
|
||||||
name: artifacts
|
name: artifacts
|
||||||
path: |
|
path: |
|
||||||
artifacts
|
artifacts
|
||||||
# - name: Keep workflow alive
|
- name: Check out, so that we can keep the workflow alive
|
||||||
# uses: gautamkrishnar/keepalive-workflow@v1
|
uses: actions/checkout@v3
|
||||||
|
- name: Keep workflow alive
|
||||||
|
uses: gautamkrishnar/keepalive-workflow@v1
|
||||||
|
|
|
@ -707,7 +707,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
runId = uuid.uuid4()
|
runId = uuid.uuid4()
|
||||||
|
|
||||||
if(arguments.on_start != None):
|
if(arguments.on_start != None and arguments.on_start != ''):
|
||||||
try:
|
try:
|
||||||
get(f"{arguments.on_start}?rid={runId}")
|
get(f"{arguments.on_start}?rid={runId}")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -727,7 +727,7 @@ if __name__ == "__main__":
|
||||||
log(f"Lock file has expired. Removed lock file.")
|
log(f"Lock file has expired. Removed lock file.")
|
||||||
else:
|
else:
|
||||||
log(f"Lock file age is {datetime.now() - lock_time} - below --lock-hours={arguments.lock_hours} provided.")
|
log(f"Lock file age is {datetime.now() - lock_time} - below --lock-hours={arguments.lock_hours} provided.")
|
||||||
if(arguments.on_fail != None):
|
if(arguments.on_fail != None and arguments.on_fail != ''):
|
||||||
try:
|
try:
|
||||||
get(f"{arguments.on_fail}?rid={runId}")
|
get(f"{arguments.on_fail}?rid={runId}")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -736,7 +736,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
log(f"Cannot read logfile age - aborting.")
|
log(f"Cannot read logfile age - aborting.")
|
||||||
if(arguments.on_fail != None):
|
if(arguments.on_fail != None and arguments.on_fail != ''):
|
||||||
try:
|
try:
|
||||||
get(f"{arguments.on_fail}?rid={runId}")
|
get(f"{arguments.on_fail}?rid={runId}")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -794,7 +794,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
os.remove(LOCK_FILE)
|
os.remove(LOCK_FILE)
|
||||||
|
|
||||||
if(arguments.on_done != None):
|
if(arguments.on_done != None and arguments.on_done != ''):
|
||||||
try:
|
try:
|
||||||
get(f"{arguments.on_done}?rid={runId}")
|
get(f"{arguments.on_done}?rid={runId}")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
@ -805,7 +805,7 @@ if __name__ == "__main__":
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
os.remove(LOCK_FILE)
|
os.remove(LOCK_FILE)
|
||||||
log(f"Job failed after {datetime.now() - start}.")
|
log(f"Job failed after {datetime.now() - start}.")
|
||||||
if(arguments.on_fail != None):
|
if(arguments.on_fail != None and arguments.on_fail != ''):
|
||||||
try:
|
try:
|
||||||
get(f"{arguments.on_fail}?rid={runId}")
|
get(f"{arguments.on_fail}?rid={runId}")
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
|
Loading…
Reference in a new issue