mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 05:26:37 +00:00
Adjust the comment explaining the situation
This commit is contained in:
parent
96f1618168
commit
468c89f17c
@ -824,12 +824,13 @@ class TasksView(ListView):
|
||||
queryset = self.get_queryset()
|
||||
now = timezone.now()
|
||||
for task in queryset:
|
||||
# There is broken logic in Task.objects.locked(), work around it.
|
||||
# Without this, the queue never resumes properly.
|
||||
# There was broken logic in `Task.objects.locked()`, work around it.
|
||||
# With that broken logic, the tasks never resume properly.
|
||||
# This check unlocks the tasks without a running process.
|
||||
# `task.locked_by_pid_running()` returns:
|
||||
# - True: locked and PID exists
|
||||
# - False: locked and PID does not exist
|
||||
# - None: not locked_by, no PID to check
|
||||
# - `True`: locked and PID exists
|
||||
# - `False`: locked and PID does not exist
|
||||
# - `None`: not `locked_by`, so there was no PID to check
|
||||
if task.locked_by_pid_running() is False:
|
||||
task.locked_by = None
|
||||
# do not wait for the task to expire
|
||||
|
Loading…
Reference in New Issue
Block a user