Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try foreasting and scheduling jobs for up to one day #198

Merged
merged 3 commits into from Oct 1, 2021

Conversation

nhoening
Copy link
Contributor

After that let Reds remove the job if it needs memory.

This is to keep our Redis memory from growing large with intensive usage by services.

Copy link
Contributor

@Flix6x Flix6x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to have constraints, but also good to be a little flexible.

@@ -108,6 +108,7 @@ def create_forecasting_jobs(
custom_model_params=custom_model_params,
),
connection=current_app.queues["forecasting"].connection,
ttl=24 * 60 * 60, # try up to one day
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to me like this should be a config setting rather than be hard coded. I'd also prefer to set the config setting as a timedelta (like FLEXMEASURES_PLANNING_TTL) and calling .total_seconds() on it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks that way to me too, but I'm afraid of having too many config settings.

@nhoening nhoening requested a review from Flix6x October 1, 2021 15:14
@nhoening nhoening merged commit cf3e260 into main Oct 1, 2021
@nhoening nhoening deleted the fixed-max-lifetime-for-jobs branch October 1, 2021 19:47
@Flix6x Flix6x added this to the 0.7.0 milestone Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants