Skip to content

Commit

Permalink
ignore result when using send_task on lightweight tasks (#3978)
Browse files Browse the repository at this point in the history
* ignore result when using send_task on lightweight tasks

* fix ignore_result

---------

Co-authored-by: Richard Kuo (Danswer) <rkuo@onyx.app>
Co-authored-by: Richard Kuo <rkuo@rkuo.com>
  • Loading branch information
3 people authored Feb 13, 2025
1 parent c0f381e commit 0c0113a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/onyx/background/celery/tasks/shared/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ def cloud_beat_task_generator(
queue=queue,
priority=priority,
expires=expires,
ignore_result=True,
)
except SoftTimeLimitExceeded:
task_logger.info(
Expand Down
1 change: 1 addition & 0 deletions backend/onyx/redis/redis_connector_credential_pair.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def generate_tasks(
queue=OnyxCeleryQueues.VESPA_METADATA_SYNC,
task_id=custom_task_id,
priority=OnyxCeleryPriority.MEDIUM,
ignore_result=True,
)

num_tasks_sent += 1
Expand Down
1 change: 1 addition & 0 deletions backend/onyx/redis/redis_connector_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def generate_tasks(
queue=OnyxCeleryQueues.CONNECTOR_DELETION,
task_id=custom_task_id,
priority=OnyxCeleryPriority.MEDIUM,
ignore_result=True,
)

async_results.append(result)
Expand Down
1 change: 1 addition & 0 deletions backend/onyx/redis/redis_connector_doc_perm_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def generate_tasks(
queue=OnyxCeleryQueues.DOC_PERMISSIONS_UPSERT,
task_id=custom_task_id,
priority=OnyxCeleryPriority.HIGH,
ignore_result=True,
)
async_results.append(result)

Expand Down
1 change: 1 addition & 0 deletions backend/onyx/redis/redis_connector_prune.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def generate_tasks(
queue=OnyxCeleryQueues.CONNECTOR_DELETION,
task_id=custom_task_id,
priority=OnyxCeleryPriority.MEDIUM,
ignore_result=True,
)

async_results.append(result)
Expand Down

0 comments on commit 0c0113a

Please sign in to comment.