FastAPI and Pyzeebe #220
Unanswered
aleksvidak
asked this question in
Q&A
Replies: 1 comment
-
Hi, I have only used the sync client to launch a process, so I don't have something that could help here. I did notice this in the async docs, maybe related:
https://docs.python.org/3/library/asyncio-task.html#creating-tasks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using version pyzeebe 3.0.0rc4 along with FastAPI framework https://fastapi.tiangolo.com/.
We use start & stop app handlers from FastAPI to start and stop worker. Something like:
We init worker with:
worker = ZeebeWorker(channel, max_task_count=2)
with Camunda Cloud channel.
After some time of inactivity on the worker and with triggering new task, we get an error:
Task exception was never retrieved future: <Task finished coro=<ZeebeWorker.work() done, defined at /usr/local/lib/python3.7/site-packages/pyzeebe/worker/worker.py:50> exception=<AioRpcError of RPC that terminated with: status = StatusCode.UNAUTHENTICATED details = "Received http2 header with status: 401" debug_error_string = "{"created":"@1631893046.722399663","description":"Received http2 :status header with non-200 OK status","file":"src/core/ext/filters/http/client/http_client_filter.cc","file_line":129,"grpc_message":"Received http2 header with status: 401","grpc_status":16,"value":"401"}" >>
Restarting the service helps, but again the same pattern repeats after some time of inactivity.
I am not sure whether it is something on our side or on the side of Pyzeebe. Any pointers would be helpful!
Maybe @JonatanMartens can help me out on this one 🙂
@kbakk did you encounter similar situation? I know from Camunda Cloud Slack channel you've been using FastAPI as well... 🙂
Beta Was this translation helpful? Give feedback.
All reactions