[RFC] Hot reload channels configuration (size, pause, ...) stored in DB
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 12/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- postgresql, python
- Domaine
- backend, distributed-systems
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 271
- Forks
- 602
- Merge moyen
- 4 j 4 h
- PR mergées (30 j)
- 6
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de OCA/queue
-
enhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 30/100
Les mainteneurs répondent en général sous 1 jour
-
Migration to version 20.0Ouvertehelp wanted no stale work in progress
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
OCA/queue#1002 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Delaying unlink or write on a model whose method was replaced raises AttributeError at enqueue timePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Les mainteneurs répondent en général sous 1 jour
-
[19.0] queue_job: Jobs stay pending after the jobrunner's database connection is silently droppedPeut-être pris @HoloborodkoBohdan l’a pris il y a 32 jours. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 25/100
OCA/queue#984 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de OCA/queue
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
NousResearch/hermes-agent#147104 ·
Les mainteneurs répondent en général sous 1 jour
-
[oblt-aw][autodoc] Document new required `shared-org-key` input for `obs-aw-dependency-review`Peut-être pris @github-actions l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
Les mainteneurs répondent en général sous 1 jour
-
bot-triaged module: inductor oncall: pt2 topic: fuzzer triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
getchaintips leaves out the active tip once a header is staged on it, where Core always lists itOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
btclib-org/btclib-node#2158 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
patrick-hudson/put.gd-desktop#979 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour