allow us to set lock-hours to 0 to prevent the action getting stuck (#18)
This commit is contained in:
parent
917ff8354d
commit
12bde97687
2 changed files with 1 additions and 4 deletions
2
.github/workflows/get_context.yml
vendored
2
.github/workflows/get_context.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
|||
path: artifacts
|
||||
- name: Get Directory structure
|
||||
run: ls -lR
|
||||
- run: python find_posts.py --access-token=${{ secrets.ACCESS_TOKEN }} --server=${{ vars.MASTODON_SERVER }} --reply-interval-in-hours=${{ vars.REPLY_INTERVAL_IN_HOURS || 0 }} --home-timeline-length=${{ vars.HOME_TIMELINE_LENGTH || 0 }} --max-followings=${{ vars.MAX_FOLLOWINGS || 0 }} --user=${{ vars.USER }} --max-followers=${{ vars.MAX_FOLLOWERS || 0 }} --http-timeout=${{ vars.HTTP_TIMEOUT || 5 }} --max-follow-requests=${{ vars.MAX_FOLLOW_REQUESTS || 0 }}
|
||||
- run: python find_posts.py --lock-hours=0 --access-token=${{ secrets.ACCESS_TOKEN }} --server=${{ vars.MASTODON_SERVER }} --reply-interval-in-hours=${{ vars.REPLY_INTERVAL_IN_HOURS || 0 }} --home-timeline-length=${{ vars.HOME_TIMELINE_LENGTH || 0 }} --max-followings=${{ vars.MAX_FOLLOWINGS || 0 }} --user=${{ vars.USER }} --max-followers=${{ vars.MAX_FOLLOWERS || 0 }} --http-timeout=${{ vars.HTTP_TIMEOUT || 5 }} --max-follow-requests=${{ vars.MAX_FOLLOW_REQUESTS || 0 }}
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
@ -694,9 +694,6 @@ if __name__ == "__main__":
|
|||
if( os.path.exists(LOCK_FILE)):
|
||||
log(f"Lock file exists at {LOCK_FILE}")
|
||||
|
||||
if(arguments.lock_hours <= 0):
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
with open(LOCK_FILE, "r", encoding="utf-8") as f:
|
||||
lock_time = parser.parse(f.read())
|
||||
|
|
Loading…
Reference in a new issue