language-learning-app/api/worker/main.py

8 lines
336 B
Python
Raw Permalink Normal View History

# Importing the tasks package registers all tasks with the procrastinate app.
from app.tasks import procrastinate_app as app
if __name__ == "__main__":
print("Starting worker...")
app.run_worker(queues=["adventure_pipeline", "default"], name="worker-1")
else:
print("not starting worker, since __name__ is not '__main__'")