mdapi-deploy-blocking-requires-asyncio-to-thread
simple-salesforce’s mdapi.deploy() is a synchronous blocking call that must be wrapped with asyncio.to_thread() in FastMCP async tool handlers. Calling it directly in an async function blocks the event loop and can cause request timeouts for large deployments. Pattern: result = await asyncio.to_thread(conn.mdapi.deploy, bytesio_obj, is_sandbox, **options).
Related
- mdapi-sync-calls-require-asyncio-to-thread-wrapping
- simple-salesforce-mdapi-deploy-returns-tuple-not-dict
- simple-salesforce-mdapi-deploy-expects-path-or-bytesio-not-b
- simple-salesforce-deploy-expects-filepath-not-base64
- sf-deploy-metadata-mcp-tool-bug-missing-sandbox-param
- simple-salesforce-mdapi-deploy-requires-sandbox-positional-a
- simple-salesforce-mdapi-methods-return-tuples-not-dicts
- salesforce-mcp-mdapi-calls-must-be-async-wrapped
- sf-lwc-deploy-passes-dict-not-zip-preexisting-design-flaw
- simple-salesforce-all-mdapi-calls-are-synchronous-must-wrap
- simple-salesforce-mdapi-sync-calls-need-asyncio-to-thread
- mdapi-sync-calls-in-async-functions-require-asyncio-to-threa
- mdapi-sync-calls-in-async-context-require-asyncio-to-thread
- all-mdapi-sync-calls-must-wrap-asyncio-to-thread