Hi everyone. I have a flow that required the `geve...
# prefect-server
Hi everyone. I have a flow that required the
will patch the SSL-library and requires the following lines to be added before
is imported in order to avoid an infinite import recursion:
Copy code
import gevent.monkey
I am trying to deploy my flow to a Prefect Server instance, but it seems I am not able to monkey-patch early enough, as I am seeing this infinite recursion error in one of my tasks. Is there any way of forcing the server to do this monkey-patch before executing the flow?
I should add that I am using the Kubernetes agent, so I suppose that each task must execute the patch before they start?
If you need this called before executing a flow, or task, maybe you can do it in a state handler so it gets called before the flow/task is executed?
@Kevin Kho - it needs to be called at import-time
I am trying to implement a task for Locust (locust.io), but this gevent-problem has halted my progress. The only solution I can see is modifying the prefect CLI to do the monkey-patch before even parsing the arguments, but this kind of defeats the purpose of having a locust-task in prefect in the first place
actually found an issue about this: https://github.com/PrefectHQ/prefect/issues/4227
You can chime in on the issue and reopen it I think.