Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Add better comments to the function for schedulers and workers
Browse files Browse the repository at this point in the history
  • Loading branch information
javierdelapuente committed Sep 19, 2024
1 parent d6397e1 commit d3727b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/flask/test_rock/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ def setup_periodic_tasks(sender, **kwargs):

@celery_app.task
def scheduled_task(scheduler_hostname):
"""Function to run a schedule task in a worker."""
"""Function to run a schedule task in a worker.
The worker that will run this task will add the scheduler hostname argument
to the "schedulers" set in Redis, and the worker's hostname to the "workers"
set in Redis.
"""
worker_hostname = hostname()
logging.info(
"scheduler host received %s in worker host %s", scheduler_hostname, worker_hostname
Expand Down

0 comments on commit d3727b9

Please sign in to comment.