Skip to content

Commit

Permalink
bugfixing scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
joschobart committed Aug 26, 2024
1 parent db0cd1a commit e5b5888
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ wheels/

# babel
*.pot
*.mo
*.mo

# dall e
.dalle
2 changes: 1 addition & 1 deletion fun_with_flags/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def create_app(test_config=None):
# regular job for challenging friendlies
sched.add_job(scheduler.sensor, "cron", day_of_week="thu", hour=8, minute=15)
# regular job for adding matches to user-db
sched.add_job(scheduler.sensor, "cron", day_of_week="tue", hour=1, minute=1)
sched.add_job(scheduler.sensor, "cron", day_of_week="tue", hour=1, minute=20)
# v--- testing ---v
# sched.add_job(scheduler.sensor, "cron", day_of_week="mon-sun", hour=21, minute=40)
sched.start()
Expand Down
5 changes: 4 additions & 1 deletion fun_with_flags/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def sensor():
# Write changements on the history-object to db
_user_couch[_user_id] = _my_doc

else:
elif datetime.today().weekday() == 3:
if _match_place == "home":
_mp = "0"
else:
Expand Down Expand Up @@ -155,6 +155,9 @@ def sensor():
# schedule tuesday object to add booked match to db
schedule(_object, "tuesday")

else:
pass

# Finally delete fernet-token from DB
# to mark a done transaction.
_my_document[_team_id]["fernet_token"] = ""
Expand Down

0 comments on commit e5b5888

Please sign in to comment.