mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-15 07:18:09 -04:00
Celery tests
This commit is contained in:
9
app/celery/tasks.py
Normal file
9
app/celery/tasks.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from app import celery
|
||||
from app.dao.services_dao import get_model_services
|
||||
|
||||
|
||||
@celery.task(name="refresh-services")
|
||||
def refresh_services():
|
||||
print(get_model_services())
|
||||
for service in get_model_services():
|
||||
celery.control.add_consumer(str(service.id))
|
||||
Reference in New Issue
Block a user