Replies: 5 comments
-
Hey @shuzhiwei! It sounds like you're creating a task run via the REST API and expecting it to be executed, is that correct? Are you running a task worker for the task you're trying to execute? This page in the documentation has information about running background tasks with Prefect: https://docs.prefect.io/3.0/develop/deferred-tasks. |
Beta Was this translation helpful? Give feedback.
-
Hey @desertaxle! Thank you very much for your documentation. task_worker.py
task_scheduler.py
but I had add |
Beta Was this translation helpful? Give feedback.
-
The example code that your provided runs fine for me even without This thread seems like it's related to a usage question, so I'm going to convert this issue to a discussion, and we can keep chatting there. |
Beta Was this translation helpful? Give feedback.
-
Hey @desertaxle! I sincerely appreciate your response. After I used the pickle serializer,task_scheduler is worked!However,we hope to use json serializer, As in the previous example, once you change the serializer to json,task_scheduler will raise that error. Is this a bug? I eagerly await your response. |
Beta Was this translation helpful? Give feedback.
-
Just noticed this bug and it seems the title of the issue should be updated to mention the json serialization issue |
Beta Was this translation helpful? Give feedback.
-
Bug summary
workflow.prepare is a flow, and create_workdir is a task,
Assume that functions such as _generate_task_key, uuid4, and so on already exist.
After the above code executes, the task is submitted and remains in Pending state!What is the reason? How could this task running normally?
Version info
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions