[RFC] Hot reload channels configuration (size, pause, ...) stored in DB
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 12/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- postgresql, python
- Bereich
- backend, distributed-systems
Rechercherichtung
This is an RFC for hot-reloading channel configuration stored in the queue.job.channel model, with a pg_notify 'reload' signal consumed by the jobrunner. Start with the jobrunner and Channel classes that handle the existing file/environment-variable configuration and the has_capacity() method the proposal changes. Done would mean the agreed design is implemented, with the is_paused behaviour and reload cycle covered by tests; the thread has 13 comments and no decision yet, so settle the design with maintainers first.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is your feature request related to a problem?
The configuration of the channels is stored in a configuration file/environment variable and need a restart of the jobrunner to be applied. This proposition aims to bring the possibility to change the configuration on the fly from the UI, which also offers new options such as pausing/resuming a channel.
Describe the solution you'd like
Add fields on queue.job.channel: capacity, sequential, throttle, running (boolean).
In the jobrunner startup, read configuration from model queue.job.channel, fallback on the current implementation based on file/environment variable.
In the queue.job.channel model, when one of the configuration field that concerns the jobrunner is changed, send a pg_notify in the same postgres channel (queue_job), but instead of a job uuid, send reload.
In the Jobrunner, when the payload is reload, go through a cycle close databases/replace the channel manager by a fresh one/configure channels/initialize databases (maybe not necessary to close/initialize database but we have to go through the steps to load all pending jobs in the channels).
Add the "paused" support in the Channel:
- New
is_paused=Falseparameter in Channel - A method is_paused() returns True if the current channel or any parent is paused
has_capacity()returns False ifis_paused()returns True
Describe alternatives you've considered
/
Additional context
The cycle to update the channels can probably be optimized to prevent reloading all at once, but changes on the configuration should be are enough not to be a problem. Maybe if the only changes are in pause/resume, we can change the channels in place instead of recreating all the channels.
- Vorherrschende Sprache
- Python
- Sterne
- 271
- Forks
- 602
- Ø Merge
- 5 T. 1 Std.
- Gemergte PRs (30 T.)
- 7
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OCA/queue
-
enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
Maintainer antworten meist innerhalb von 1 Tag
-
help wanted no stale work in progress
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
OCA/queue#1002 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Delaying unlink or write on a model whose method was replaced raises AttributeError at enqueue timeEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
-
[19.0] queue_job: Jobs stay pending after the jobrunner's database connection is silently droppedEvtl. vergeben @HoloborodkoBohdan hat das vor 32 Tagen übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 25/100
OCA/queue#984 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
pytest-dev/pytest-html#1085 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
pollen-robotics/reachy_mini#1527 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
A seed and its negative give the same run, so realizations of a negative seed repeat each otherOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag