[RFC] Hot reload channels configuration (size, pause, ...) stored in DB
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- postgresql, python
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 271
- フォーク
- 602
- 平均マージ
- 4日 4時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OCA/queue のほかの issue
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
help wanted no stale work in progress
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Delaying unlink or write on a model whose method was replaced raises AttributeError at enqueue time対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
[19.0] queue_job: Jobs stay pending after the jobrunner's database connection is silently dropped対応中かも @HoloborodkoBohdan が 32 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
OCA/queue#984 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vllm-project/vllm#64845 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
dekobon/big-code-analysis#1729 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pydantic/pydantic-ai#12091 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100