Skip to content

Commit

Permalink
only allow a single "import library" task to run since we're using sq…
Browse files Browse the repository at this point in the history
…lit and it can't handle that much concurrency (tables get locked)
  • Loading branch information
lardbit committed Nov 18, 2024
1 parent ecb2177 commit 2228ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nefarious/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def auto_watch_new_seasons_task():
watch_show.save()


@app.task(base=QueueOnce)
@app.task(base=QueueOnce, once={'keys': []}) # queue once regardless of args
def import_library_task(media_type: str, user_id: int, sub_path: str = None):
user = get_object_or_404(User, pk=user_id)
nefarious_settings = NefariousSettings.get()
Expand Down

0 comments on commit 2228ce0

Please sign in to comment.