test_ken_dev

app/tasks.py

Jan 24th, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | Software | 0 0
  1. from celery import shared_task
  2. import time
  3.  
  4.  
  5. @shared_task(ignore_result=False)
  6. def hello_world():
  7.     for i in range(1, 6):
  8.         print(i)
  9.         time.sleep(1)
  10.     print("Hello Celery")
  11.  
  12.  
  13. @shared_task(ignore_result=False)
  14. def fetch_and_process_sales_data():
  15.     print("Fetching and processing sales data")
  16.  
Advertisement
Add Comment
Please, Sign In to add comment