Skip to content

Commit

Permalink
fix: proper sync task calling
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnagro committed Jan 12, 2024
1 parent 6ba56d2 commit 4233732
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def handle(self, *args, **options):
logger.info(
'index_enterprise_catalog_in_algolia_task launching synchronously.'
)
# For some reason in order to call a celery task in-memory you must pass kwargs as args.
index_enterprise_catalog_in_algolia_task(force_task_execution, dry_run)
index_enterprise_catalog_in_algolia_task.apply(
kwargs={'force': force_task_execution, 'dry_run': dry_run}
)
else:
index_enterprise_catalog_in_algolia_task.apply_async(
kwargs={'force': force_task_execution, 'dry_run': dry_run}
Expand Down

0 comments on commit 4233732

Please sign in to comment.