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

feat: allow to pass extra parameters for celery workers #11

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Sep 6, 2024

Description

This PR allows to pass custom parameters to any celery worker deployment

@Ian2012 Ian2012 changed the base branch from main to cag/autoscaling September 6, 2024 21:12
@Ian2012 Ian2012 changed the title Cag/parameters feat: allow to pass extra parameters for celery workers Sep 6, 2024
@Ian2012 Ian2012 force-pushed the cag/parameters branch 8 times, most recently from 27dda21 to c858d5d Compare September 12, 2024 15:26
Base automatically changed from cag/autoscaling to main September 12, 2024 15:26
@Ian2012 Ian2012 marked this pull request as ready for review October 3, 2024 21:21
Comment on lines 34 to 36
{% for setting, value in config.get("extra_params", {}).items() %}
- "--{{setting}}={{value}}"
{% endfor %}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can have the logic for the command in the python code and use a template filter to render the final command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer rendering this code on the template, it's just a setting and a value

Comment on lines 34 to 36
{% for setting, value in config.get("extra_params", {}).items() %}
- "--{{setting}}={{value}}"
{% endfor %}

Choose a reason for hiding this comment

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

could this be susceptible to malicious injection of some sort?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so

@Ian2012 Ian2012 force-pushed the cag/parameters branch 6 times, most recently from 2e60d20 to c176c05 Compare December 12, 2024 19:01
(cherry picked from commit c858d5d)

docs: add section with extra parameters

docs: add section with extra parameters

refactor!: use new filter to define celery command

(cherry picked from commit 53fafef)
@Ian2012 Ian2012 merged commit f523906 into main Dec 12, 2024
1 check passed
@Ian2012 Ian2012 deleted the cag/parameters branch December 12, 2024 19:44
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.

3 participants