Skip to content

Commit

Permalink
Merge branch 'feature/async-start-flow' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
zMardone committed Dec 26, 2023
2 parents 8ba4389 + c71d624 commit 83b3ba4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions connect/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"end_trial_plan": {'queue': 'billing'},
"check_organization_plans": {'queue': 'billing'},
"daily_contact_count": {'queue': 'billing'},
"sync-project-statistics": {'queue': 'sync'},
"sync-channels-statistics": {'queue': 'sync'},
"sync-total-active-contacts": {'queue': 'sync'},
"sync-active-contacts": {'queue': 'sync'},
"sync_project_statistics": {'queue': 'sync'},
"sync_channels_statistics": {'queue': 'sync'},
"sync_total_contact_count": {'queue': 'sync'},
"sync_active_contacts": {'queue': 'sync'},
}


Expand All @@ -41,23 +41,23 @@
"task": "connect.common.tasks.check_organization_free_plan",
"schedule": schedules.crontab(minute="*/6"),
},
"sync-project-statistics": {
"sync_project_statistics": {
"task": "sync_project_statistics",
"schedule": schedules.crontab(minute="*/6")
},
"sync-channels-statistics": {
"sync_channels_statistics": {
"task": "sync_channels_statistics",
"schedule": schedules.crontab(minute="*/7")
},
"generate_project_invoice": {
"task": "connect.common.tasks.generate_project_invoice",
"schedule": schedules.crontab(hour="12", minute=0),
},
"sync-total-active-contacts": {
"sync_total_contact_count": {
"task": "connect.common.tasks.sync_total_contact_count",
"schedule": schedules.crontab(hour="3", minute=0)
},
"sync-active-contacts": {
"sync_active_contacts": {
"task": "connect.common.tasks.sync_active_contacts",
"schedule": schedules.crontab(hour="*/6", minute=0)
},
Expand Down
4 changes: 2 additions & 2 deletions connect/common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def check_organization_free_plan():
return True


@app.task()
@app.task(name="sync_active_contacts")
def sync_active_contacts():
for project in Project.objects.all()[:10]:
try:
Expand All @@ -321,7 +321,7 @@ def sync_active_contacts():
return True


@app.task()
@app.task(name="sync_total_contact_count")
def sync_total_contact_count():
if settings.USE_FLOW_REST:
flow_instance = FlowsRESTClient()
Expand Down

0 comments on commit 83b3ba4

Please sign in to comment.