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

Create try-with wrapper to temporarily provide context to python entrypoints #200

Open
bjester opened this issue Feb 12, 2024 · 0 comments

Comments

@bjester
Copy link
Member

bjester commented Feb 12, 2024

If this was where the context issue was originating from then it probably has to do with removing the worker reference from this utility in combination with using some non-RemoteListenableWorker workers. Since the non-RemoteListenableWorker workers would be started by the system, we wouldn't necessarily have access to the foreground service. Storing static instances of the worker is bad, not only for the reasons regarding the context, but also because multiple instances could be running at once, so you don't necessarily get the instance you expect.

An alternative would be to go back to having all workers be RemoteListenableWorkers. Or use a sort of context manager approach in the worker such that this utility returns that context when called within that block

Originally posted by @bjester in #199 (comment)

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

1 participant