Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[RFC] Hot reload channels configuration (size, pause, ...) stored in DB

Aperta
#765 13 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

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=False parameter in Channel
  • A method is_paused() returns True if the current channel or any parent is paused
  • has_capacity() returns False if is_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.

Lingua principale
Python
Stelle
271
Fork
602
Merge medio
4g 4h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OCA/queue

Tutte le issue di OCA/queue

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.