pypi APScheduler 4.0.0a6

4 months ago
  • BREAKING Refactored AsyncpgEventBroker to directly accept a connection string, thus eliminating the need for the AsyncpgEventBroker.from_dsn() class method
  • BREAKING Added the extend_acquired_schedule_leases() data store method to prevent other schedulers from acquiring schedules already being processed by a scheduler, if that's taking unexpectedly long for some reason
  • BREAKING Added the extend_acquired_job_leases() data store method to prevent jobs from being cleaned up as if they had been abandoned (#864)
  • BREAKING Changed the cleanup() data store method to also be responsible for releasing jobs whose leases have expired (so the schedulers responsible for them have probably died)
  • BREAKING Changed most attributes in Task and Schedule classes to be read-only
  • BREAKING Refactored the release_schedules() data store method to take a sequence of ScheduleResult instances instead of a sequence of schedules, to enable the memory data store to handle schedule updates more efficiently
  • BREAKING Replaced the data store lock_expiration_delay parameter with a new scheduler-level parameter, lease_duration which is then used to call the various data store methods
  • BREAKING Added the job_result_expiration_time field to the Schedule class, to allow the job results from scheduled jobs to stay around for some time (#927)
  • BREAKING Added an index for the created_at job field, so acquiring jobs would be faster when there are a lot of them
  • BREAKING Removed the job_executor and max_running_jobs parameters from add_schedule() and add_run_job() (explicitly configure the task using configure_task() or by using the new @task decorator
  • BREAKING Replaced the default_job_executor scheduler parameter with a more comprehensive task_defaults parameter
  • Added the @task decorator for specifying task configuration parameters bound to a function
  • BREAKING Changed tasks to only function as job templates as well as buckets to limit maximum concurrent job execution
  • BREAKING Changed the timezone argument to CronTrigger.from_crontab() into a keyword-only argument
  • BREAKING Added the metadata field to tasks, schedules and jobs
  • BREAKING Added logic to store last_fire_time in datastore implementations (PR by @hlobit)
  • BREAKING Added the reap_abandoned_jobs() abstract method to DataStore which the scheduler calls before processing any jobs in order to immediately mark jobs left in an acquired state when the scheduler crashed
  • Added the start_time and end_time arguments to CronTrigger.from_crontab() (#676)
  • Added the psycopg event broker
  • Added useful indexes and removed useless ones in SQLAlchemyDatastore and MongoDBDataStore
  • Changed the lock_expiration_delay parameter of built-in data stores to accept a timedelta as well as int or float
  • Fixed serialization error with CronTrigger when pausing a schedule (#864)
  • Fixed TypeError: object NoneType can't be used in 'await' expression at teardown of SQLAlchemyDataStore when it was passed a URL that implicitly created a synchronous engine
  • Fixed serializers raising their own exceptions instead of SerializationError and DeserializationError as appropriate
  • Fixed repr() outputs of schedulers, data stores and event brokers to be much more useful and reasonable
  • Fixed race condition in MongoDBDataStore that allowed multiple schedulers to acquire the same schedules at once
  • Changed SQLAlchemyDataStore to automatically create the explicitly specified schema if it's missing (PR by @zhu0629)
  • Fixed an issue with CronTrigger infinitely looping to get next date when DST ends (#980; PR by @hlobit)
  • Skip dispatching extend_acquired_job_leases with no jobs (PR by @JacobHayes)
  • Fixed schedulers not immediately processing schedules that the scheduler left in an acquired state after a crash
  • Fixed the job lease extension task exiting prematurely while the scheduler is starting (PR by @JacobHayes)
  • Migrated test and documentation dependencies from extras to dependency groups
  • Fixed add_job() overwriting task configuration (PR by @mattewid)

Don't miss a new APScheduler release

NewReleases is sending notifications on new releases.