Ratery
Ratery

Reputation: 2917

Async job store in APScheduler

I know how to create custom job stores with APScheduler. But they are synchronous. For example MongoDBJobstore uses pymongo. Pymongo is a blocking lib. Is it possible to use non-blocking motor instead of pymongo in custom Jobstore with APScheduler?

Upvotes: 0

Views: 588

Answers (1)

Alex Grönholm
Alex Grönholm

Reputation: 5901

APScheduler 4 (currently in development) supports asynchronous stores. However, since motor is just a wrapper that uses threads to talk to pymongo, APScheduler 4 only has a synchronous mongodb store that gets wrapped with a generic async adapter when used with an asynchronous scheduler or worker.

APScheduler 3 does not have an interface for asynchronous job stores.

Upvotes: 1

Related Questions