Second Brain

Home

❯

_archive

❯

cleanup 2026 04 17 conversation flush bulk

❯

knowledge

❯

operational

❯

mdapi deploy blocking requires asyncio to thread

mdapi-deploy-blocking-requires-asyncio-to-thread

Apr 09, 20261 min read

  • domain/salesforce
  • mcp/tools
  • ops/deployment

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

Graph View

  • mdapi-deploy-blocking-requires-asyncio-to-thread
  • Related

Backlinks

  • all-mdapi-sync-calls-must-wrap-asyncio-to-thread
  • mdapi-sync-calls-in-async-context-require-asyncio-to-thread
  • mdapi-sync-calls-in-async-functions-require-asyncio-to-threa
  • sf-lwc-deploy-passes-dict-not-zip-preexisting-design-flaw
  • simple-salesforce-deploy-expects-filepath-not-base64
  • simple-salesforce-mdapi-deploy-requires-sandbox-positional-a
  • simple-salesforce-mdapi-deploy-returns-tuple-not-dict
  • simple-salesforce-mdapi-methods-return-tuples-not-dicts
  • simple-salesforce-mdapi-sync-calls-need-asyncio-to-thread
  • mdapi-sync-calls-require-asyncio-to-thread-wrapping
  • salesforce-mcp-mdapi-calls-must-be-async-wrapped
  • simple-salesforce-all-mdapi-calls-are-synchronous-must-wrap

Created with Quartz v4.5.2 © 2026

  • CIOS
  • Mission Control