DenoDDeno
Powered by
IsaacR943I
Deno•4mo ago•
3 replies
IsaacR943

Is possible to spawn a worker inside an http?

Is it possible to spawn background workers on Deno Deploy? My goal is to handle an HTTP request, return a response immediately, and continue running a long-running process (3–5 minutes) in the background. trigger a worker rather than call a separate application. The background task involves agents/Mistral

implementation below, this are the logs:
[2025-11-19T21:09:32.969Z] [INFO] [LINE 559][chat_response.ts][spawn_agent_worker] Function called for answer agent
[2025-11-19T21:09:32.969Z] [INFO] [LINE 563][chat_response.ts][spawn_agent_worker] Worker URL constructed
[2025-11-19T21:09:32.987Z] [INFO] [LINE 577][chat_response.ts][spawn_agent_worker] Worker instance created
[2025-11-19T21:09:32.987Z] [INFO] [LINE 580][chat_response.ts][spawn_agent_worker] Worker stored in registry
[2025-11-19T21:09:32.988Z] [INFO] [LINE 602][chat_response.ts][spawn_agent_worker] Message sent to worker
[2025-11-19T21:09:32.988Z] [INFO] [LINE 614][chat_response.ts][call_agent_answer] STEP 4: spawn_agent_worker returned
[2025-11-19T21:09:32.988Z] [INFO] [LINE 615][chat_response.ts][call_agent_answer] STEP 4: Worker spawn initiated
[2025-11-19T21:09:32.969Z] [INFO] [LINE 559][chat_response.ts][spawn_agent_worker] Function called for answer agent
[2025-11-19T21:09:32.969Z] [INFO] [LINE 563][chat_response.ts][spawn_agent_worker] Worker URL constructed
[2025-11-19T21:09:32.987Z] [INFO] [LINE 577][chat_response.ts][spawn_agent_worker] Worker instance created
[2025-11-19T21:09:32.987Z] [INFO] [LINE 580][chat_response.ts][spawn_agent_worker] Worker stored in registry
[2025-11-19T21:09:32.988Z] [INFO] [LINE 602][chat_response.ts][spawn_agent_worker] Message sent to worker
[2025-11-19T21:09:32.988Z] [INFO] [LINE 614][chat_response.ts][call_agent_answer] STEP 4: spawn_agent_worker returned
[2025-11-19T21:09:32.988Z] [INFO] [LINE 615][chat_response.ts][call_agent_answer] STEP 4: Worker spawn initiated
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Possible to check of a file is being run as worker?
BlockzillaBBlockzilla / help
4y ago
Serving multiple static files to an HTTP request
ZidanZZidan / help
3y ago