Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
scetron committed Nov 9, 2023
1 parent 226f7fe commit 480c852
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nautobot_device_onboarding/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ def enqueue_onboarding_task(task_id, credentials):
"""Detect worker type and enqueue task."""
if CELERY_WORKER:
# on commit
transaction.on_commit(
lambda: onboard_device_worker.delay(task_id, credentials.nautobot_serialize())
)
transaction.on_commit(lambda: onboard_device_worker.delay(task_id, credentials.nautobot_serialize()))

if not CELERY_WORKER:
get_queue("default").enqueue( # pylint: disable=used-before-assignment
Expand Down

0 comments on commit 480c852

Please sign in to comment.