Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled Tasks Numbers differ #257

Open
MatthK opened this issue Jul 24, 2022 · 8 comments
Open

Scheduled Tasks Numbers differ #257

MatthK opened this issue Jul 24, 2022 · 8 comments

Comments

@MatthK
Copy link

MatthK commented Jul 24, 2022

It's not that much of a problem, as it is still working, but I was wondering how to fix it.

On the dashboard, it shows that there are 290 tasks scheduled. When I go to the tasks page, it says there are only 15 scheduled (the number of sources I have).

I have reset the tasks, but that didn't help.

TubeSync version 0.10.0 with yt-dlp version 2022.03.08.2 and FFmpeg version 4.3.3-0+deb11u1.

@meeb
Copy link
Owner

meeb commented Jul 24, 2022

Interesting, the count is just what's in the tasks table so not entirely sure why the number would be different. I'm likely not going to look into this too much given the tasks system is (relatively imminently) being replaced.

@MatthK
Copy link
Author

MatthK commented Jul 24, 2022

Understood. I just had a look at the table with the tasks and apart from the 15 expected tasks, all the others have the following content (apart from the changing YT ID:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/background_task/tasks.py", line 43, in bg_runner
    func(*args, **kwargs)
  File "/app/sync/tasks.py", line 227, in download_media_metadata
    metadata = media.index_metadata()
  File "/app/sync/models.py", line 1267, in index_metadata
    return indexer(self.url)
  File "/app/sync/youtube.py", line 60, in get_media_info
    raise YouTubeError(f'Failed to extract_info for "{url}": No metadata was '
sync.youtube.YouTubeError: Failed to extract_info for "https://www.youtube.com/watch?v=btl0knU2CxU": No metadata was returned by youtube-dl, check for error messages in the logs above. This task will be retried later with an exponential backoff.

But yes, it's not really an issue, just a cosmetic detail.

@meeb
Copy link
Owner

meeb commented Jul 24, 2022

Ah so you have a bunch of failed tasks which have stuck about and are being counted in the total number of tasks but have expired so aren't showing on the tasks queue page as scheduled. Makes sense. I don't think this is actually incorrect as a count, just the tasks page splits tasks out into "running", "scheduled into the future" and "failed" as different counts.

@MatthK
Copy link
Author

MatthK commented Jul 24, 2022

Ok. Can I delete those manually from the table?

@meeb
Copy link
Owner

meeb commented Jul 24, 2022

Yes, the worst thing that will happen is a video that didn't download after several retries doesn't get tried again. Delete away.

@MatthK
Copy link
Author

MatthK commented Jul 24, 2022

Deleted those 274 tasks. Now it looks good. Thanks.

@MatthK
Copy link
Author

MatthK commented Jul 25, 2022

Ha, that seems to be "self-healing". The 291 tasks are back on the dashboard.

@meeb
Copy link
Owner

meeb commented Jul 25, 2022

They might break quite a lot but at least they are reliably broken...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants