With Stream 4.1+, Action Scheduler is now a dependency of Stream. This seems to have been introduced in #1543 as a way to deal with large tables in cases where cron may be unreliable.
However, this is a pretty hefty requirement to add in for a less common case, and in some cases it may not actually be necessary. When using a third-party database driver (i.e. implementing the DB_Driver interface), purging old records may not be desirable or necessary; on smaller sites, the overhead of AS for processing large record counts isn't necessary anyway. Additionally, when using a service like Cavalcade for reliable cron, wp-cron tasks work fine anyway.
This is an issue for us on Altis as Action Scheduler operates less efficiently for this sort of processing than wp-cron, and we bundle Stream. We also use a custom storage driver as we store records in a separate tamper-proof database.
I'd like to propose moving AS to being an optional dependency of Stream. This would entail two changes:
- Switch the action scheduling functions to conditionally call AS - if it's loaded, use
as_enqueue_async_action() etc, otherwise use regular wp-cron
- Move AS from being a dependency to being a
suggest package
This would allow using AS on the sites that need it, while not needing it for the common case and when not necessary.
With Stream 4.1+, Action Scheduler is now a dependency of Stream. This seems to have been introduced in #1543 as a way to deal with large tables in cases where cron may be unreliable.
However, this is a pretty hefty requirement to add in for a less common case, and in some cases it may not actually be necessary. When using a third-party database driver (i.e. implementing the
DB_Driverinterface), purging old records may not be desirable or necessary; on smaller sites, the overhead of AS for processing large record counts isn't necessary anyway. Additionally, when using a service like Cavalcade for reliable cron, wp-cron tasks work fine anyway.This is an issue for us on Altis as Action Scheduler operates less efficiently for this sort of processing than wp-cron, and we bundle Stream. We also use a custom storage driver as we store records in a separate tamper-proof database.
I'd like to propose moving AS to being an optional dependency of Stream. This would entail two changes:
as_enqueue_async_action()etc, otherwise use regular wp-cronsuggestpackageThis would allow using AS on the sites that need it, while not needing it for the common case and when not necessary.