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

Read worker information in load_fnc and request_fnc #1032

Open
longcw opened this issue Nov 3, 2024 · 0 comments
Open

Read worker information in load_fnc and request_fnc #1032

longcw opened this issue Nov 3, 2024 · 0 comments
Assignees

Comments

@longcw
Copy link
Contributor

longcw commented Nov 3, 2024

For some use cases, we want to determine the workload based on the activate jobs in the worker. For now the only way to do this is to modify the run_worker in cli to create a Worker first then manually replace the opts.load_fnc and opts.request_fnc.

Maybe adding a worker arg to these two methods is not a good idea, I wonder if we can make cli.run_app accept a "before_run_hook" that takes worker as input to modify these methods in that hook.

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

No branches or pull requests

2 participants