Worker never claims LOW priority jobs
๐ Looking for an issue? Welcome! This issue is open for contribution. If this is the first time youโre requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that donโt follow the guidelines wonโt be answered.
- Confirm that youโve read the guidelines in your comment.
Overview
The task worker never claims jobs enqueued at Priority.LOW, so they stay queued indefinitely. Network location connection retries and connection checks between two subset-of-users devices are enqueued at LOW, so a peer that fails one connection check is never checked again.
Complexity: Low Target branch: develop
Context
_filter_next_queryfilters onpriority__lte=priority, andget_next_queued_jobdefaultsprioritytoPriority.REGULAR(10).Priority.LOWis 15. storage.py#L215-L219, constants.py#L22-L24WorkerSupervisor.get_next_jobonly ever requests REGULAR or HIGH. worker.py#L278-L286_enqueue_network_location_update_with_backoffretries at LOW, andadd_dynamic_network_locationenqueues at LOW when both devices are subset-of-users devices. discovery/tasks.py#L195-L198, discovery/tasks.py#L255-L259
The Change
Regular worker slots should claim LOW jobs, ranked below REGULAR, instead of excluding them. The high-priority slot keeps its current behaviour.
Acceptance Criteria
General
- [ ] With no HIGH or REGULAR job due, a free regular slot claims a due LOW job.
- [ ] A regular slot claims due jobs in ranked order HIGH, then REGULAR, then LOW, regardless of the order they were queued.
- [ ] While all regular slots are busy, the high-priority slot claims only HIGH jobs.
- [ ] A network location connection retry deferred at LOW runs once it is due.
Testing
- [ ] Each criterion above is covered by a test.
AI usage
Claude Code found the defect while reviewing task-runner changes and drafted this issue. I chose the intended behaviour (ranked HIGH, REGULAR, LOW) and the scope, and reviewed each section.
Hi! ๐
This issue is available for contribution and supports self-assignment. Here's how to get started:
- Comment
/assignto assign yourself to this issue - You can have up to 2 issues assigned at a time across all community repos
- Dropping an issue has a 7-day cooldown before the slot opens up
- Link your pull request to this issue when you submit it
๐ Read the Contributing guidelines before starting.
Are you preparing for Google Summer of Code? See our GSoC guidelines.
/assign
Hi! ๐
You've been assigned to this issue. Here's what to do next:
- Read the issue description carefully and make sure you understand the requirements
- Link your pull request to this issue when you submit it
- If you can no longer work on this, unassign yourself so others can pick it up
Good luck! ๐
Are you preparing for Google Summer of Code? See our GSoC guidelines.
``/assign
Hi! ๐
Thanks so much for your interest! This issue is already assigned. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.
We really appreciate your willingness to help. ๐
Are you preparing for Google Summer of Code? See our GSoC guidelines.