Skip to content

Commit

Permalink
Fixing scheduling of Celery tasks (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Feb 9, 2022
1 parent 10975ce commit 40591b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ History / Changelog
HEAD (unreleased)
-----------------

- Fixing scheduling of Celery tasks (#72)

------
v0.3.3
------
Expand Down
4 changes: 2 additions & 2 deletions fileboxes/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def fileboxes_update_states(_self):
object.update_state_meta(root, "state_meta", "INACTIVE")


@app.on_after_configure.connect
@app.on_after_finalize.connect
def setup_periodic_tasks(sender, **_kwargs):
"""Register periodic tasks"""
# Update the error message caches hourly, if necessary.
sender.add_periodic_task(schedule=crontab(), signature=fileboxes_update_states.s())
sender.add_periodic_task(schedule=crontab(), sig=fileboxes_update_states.s())
4 changes: 2 additions & 2 deletions flowcells/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def flowcell_update_outdated_error_caches(_self):
return tuple(result)


@app.on_after_configure.connect
@app.on_after_finalize.connect
def setup_periodic_tasks(sender, **_kwargs):
"""Register periodic tasks"""
# Update the error message caches hourly, if necessary.
sender.add_periodic_task(
schedule=crontab(minute=11), signature=flowcell_update_outdated_error_caches.s()
schedule=crontab(minute=11), sig=flowcell_update_outdated_error_caches.s()
)

0 comments on commit 40591b6

Please sign in to comment.