Always enable RQ embedded scheduler in flexmeasures jobs run-worker#2112
Open
Ragnar-the-mighty wants to merge 1 commit intoFlexMeasures:mainfrom
Open
Always enable RQ embedded scheduler in flexmeasures jobs run-worker#2112Ragnar-the-mighty wants to merge 1 commit intoFlexMeasures:mainfrom
Ragnar-the-mighty wants to merge 1 commit intoFlexMeasures:mainfrom
Conversation
Pass with_scheduler=True to Worker.work() and log startup line so enqueue_in jobs are promoted when due. Document under v0.32.0 bugfixes (issue FlexMeasures#2105). Made-with: Cursor
Documentation build overview
|
Flix6x
requested changes
Apr 16, 2026
| Bugfixes | ||
| ----------- | ||
| * Fix the Swagger endpoint for fetching a schedule [see `PR #2109 <https://www.github.com/FlexMeasures/flexmeasures/pull/2109>`_] | ||
| * Run ``flexmeasures jobs run-worker`` with RQ's embedded scheduler always on so jobs created with ``enqueue_in`` are promoted from the scheduled registry when due [see `issue #2105 <https://github.com/FlexMeasures/flexmeasures/issues/2105>`_] |
Contributor
There was a problem hiding this comment.
This should go under v0.33.0: Infrastructure / Support.
| Bugfixes | ||
| ----------- | ||
| * Fix the Swagger endpoint for fetching a schedule [see `PR #2109 <https://www.github.com/FlexMeasures/flexmeasures/pull/2109>`_] | ||
| * Run ``flexmeasures jobs run-worker`` with RQ's embedded scheduler always on so jobs created with ``enqueue_in`` are promoted from the scheduled registry when due [see `issue #2105 <https://github.com/FlexMeasures/flexmeasures/issues/2105>`_] |
Contributor
There was a problem hiding this comment.
We cross-reference PRs in our changelog rather than issues. So this would be PR #2112.
| click.echo("=========================================================\n") | ||
|
|
||
| worker.work() | ||
| worker.work(with_scheduler=True) |
Contributor
There was a problem hiding this comment.
I suggest making this a CLI option (flag) so hosts still have the option to turn it on/off should things go south. On by default is fine.
@click.option(
"--with-scheduler/--without-scheduler",
"with_scheduler",
default=True,
help="...",
)
...
Suggested change
| worker.work(with_scheduler=True) | |
| worker.work(with_scheduler=with_scheduler) |
And please amend the click.echo accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Worker.work(with_scheduler=True)so jobs queued withenqueue_inare promoted from the scheduled registry when due (RQ default is not to run the embedded scheduler).RQ embedded scheduler: on (enqueue_in jobs).Context
Closes #2105
Made with Cursor