synology_apm_repo.sdk.storage.store_descriptor module¶
Picklable stand-ins for a live ObjectStore, so a worker process from
concurrency.new_process_pool() can rebuild an equivalent store: an open
S3Store/AzureStore/SmbStore holds a client bound to the parent’s
event loop and can’t cross a process boundary. Each backend describes
itself (descriptor()) and each descriptor rebuilds its store
(build()); this module is the dispatch over both.
- synology_apm_repo.sdk.storage.store_descriptor.describe_store(store)¶
storeas a picklable recipe for rebuilding an equivalent store, orNone(never an error) when that is impossible; callers then stay single-process.Noneis returned for:an
InstrumentedStorewrapper such asTracingStore, or any otherObjectStorewithoutdescriptor(): a wrapper observes every call, and a worker rebuilt from the bare backend would bypass it.an
S3Store/AzureStorebuilt from an injectedclient=.
- synology_apm_repo.sdk.storage.store_descriptor.rebuild_store(descriptor)¶
The worker-side counterpart to
describe_store(). Every backend constructor is synchronous and does no network I/O, so this is safe inside aProcessPoolExecutorinitializer=.