Not Receiving Messages Back on Workflow Python
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 32/100
Research direction
Start with the FastAPI handler registered through Serve(app), then run the reported /hello-world request alongside npx @upstash/qstash-cli dev and inspect the workflow execution path around context.run("step1") and context.run("step2"). Done means determining whether both steps execute locally and identifying how their output or execution status is surfaced.
Written by the indexing model from the issue text.
Description
Hi! I like the Upstash product and I've used it in my past projects, but now that I'm trying Upstash Workflow, I can't seem to get it working locally.
Here's my code:
import os
from dotenv import load_dotenv
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from upstash_workflow import AsyncWorkflowContext
from upstash_workflow.fastapi import Serve
load_dotenv("../.env.local")
app = FastAPI()
serve = Serve(app)
@serve.post("/hello-world")
async def call(context: AsyncWorkflowContext[str]) -> None:
print("RECEIVED REQUEST")
input = context.request_payload
async def _step1() -> str:
output = "hello1"
print("step 1 input", input, "output", output)
return output
result1: str = await context.run("step1", _step1)
async def _step2() -> str:
output = "hello2"
print("step 2 input", result1, "output", output)
return output
output_step2: str = await context.run("step2", _step2)
print("step 2 output", output_step2)
I'm running Upstash locally using npx @upstash/qstash-cli dev
When I send a request to the hello-world endpoint, all I see printed out is:
RECEIVED REQUEST
INFO: 127.0.0.1:62186 - "POST /hello-world HTTP/1.1" 200 OK
The response is:
{
"workflowRunId": "wfr_pEZC6_EE0iEfiaYPHz00X"
}
In my FastAPI application terminal, I don't see "step 1 input", "step 2 input", or "step 2 output". I also don't see any additional logs on the Upstash terminal when I make requests.
How do I know if step1 or step2 were actually run?
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from upstash/qstash-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
upstash/qstash-cli#11 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
upstash/qstash-cli#10 ·
-
bug: `Bus error` when using `pnpm` on LinuxPossibly taken @smorimoto claimed this 187 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
upstash/qstash-cli#9 ·
-
issue running the cli using bunxPossibly taken @smorimoto claimed this 187 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
upstash/qstash-cli#6 · 4 comments ·
All issues in upstash/qstash-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
jasonacox/pypowerwall#472 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sebastienros/jint#4531 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ome/ngff-rfc8-revisions#50 ·
Maintainers usually reply within 3 days
-
[Bug] Root filesystem scope (/) incorrectly rejects all descendant pathsPossibly taken @mugenkyou claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
neutralinojs/neutralino.js#304 · 1 comment ·