funboost-rpc-mode

Retrieve return values from funboost distributed tasks using AsyncResult and Redis.

892|166|Updated Dec 25, 2021
One-click install
npx skills add https://github.com/ydf0509/funboost --skill funboost-rpc-mode-ydf0509
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: funboost-rpc-mode
Source: https://github.com/ydf0509/funboost/tree/main/.agents/skills/funboost-rpc-mode
Command: npx skills add https://github.com/ydf0509/funboost --skill funboost-rpc-mode-ydf0509

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires funboost, redis.

What problem does it solve? Standard message queue consumers are fire-and-forget: you publish a task but never see the function's return value. This Skill shows how to enable funboost's RPC mode so publishers receive a task_id and can query the execution result, status, and success flag of any consumed task. ## Core Features & Use Cases - Synchronous RPC: Set is_using_rpc_mode=True in BoosterParams, then call func.push(...) to get an AsyncResult whose .result property blocks until the return value is ready. - Asynchronous RPC: Use await func.aio_push(...) to obtain an AioAsyncResult and await its .result or .status_and_result inside async code. - Query by task_id: Reconstruct AsyncResult(task_id) or AioAsyncResult(task_id) later to fetch status_and_result dictionaries or FunctionResultStatus objects. - Use Case: Build an HTTP API that submits a long-running background job via push(), stores the returned task_id, and lets clients poll an endpoint that reads AsyncResult(task_id).status_and_result to report progress and the final value. ## Quick Start Enable RPC mode on my funboost add function and show me how to push a task and block until its return value is available.

Frequently Asked Questions about funboost-rpc-mode

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get the return value of a funboost task?▼

Set is_using_rpc_mode=True in BoosterParams, then call func.push(...) to receive an AsyncResult object. Access its .result property to block until the function's return value is ready, or use .status_and_result for a status dictionary.

How to get task results in async funboost code?▼

Use await func.aio_push(...) to obtain an AioAsyncResult, then await its .result or .status_and_result properties. Never use the synchronous AsyncResult.result inside async functions, as it blocks the event loop.

Does funboost RPC mode require Redis?▼

Yes, RPC results are always stored in Redis regardless of which broker the queue uses. You must configure REDIS_HOST, REDIS_PORT, and REDIS_PASSWORD in funboost_config.py before results can be persisted and queried.

Why does AsyncResult.status_and_result return None?▼

It returns None on timeout when no result was stored, most commonly because is_using_rpc_mode=True was not set in BoosterParams. Without that flag the framework never persists return values, and .result eventually raises HasNotAsyncResult.

Can I query a funboost task result by task_id later?▼

Yes, save the task_id returned by push() and later construct AsyncResult(task_id) or AioAsyncResult(task_id) to fetch the result. The default wait timeout is 1800 seconds and can be shortened via AsyncResult(task_id, timeout=30).