During devchat #31 - we had a bit of a discussion around the awesomeness of Action Scheduler being included in Woo core now, and just how easy it is for developers to implement with the queue'ing system. But the concern was raised that if too many jobs are placed into the default group, it might make it difficult for WP CLI job runners to be configured to prioritize more critical jobs ( i.e. subscription renewals vs populating stats lookup tables ).
As such, this issue is to explore and / implement a group specifically for Woo Analytics on the jobs created here in wc-admin.
@rrennick if you are able to tackle this issue, I think your knowledge in this area would be a huge help. It would also be a nice opportunity for you to check out our queueing logic, and see if there are any issues with how we have things setup.
I created https://github.com/Prospress/action-scheduler/issues/236 to discuss the details/implementation.
The first step in implementing new features in scheduled actions is to test WooCommerce Admin with the latest version of Action Scheduler. Action Scheduler is designed to use the latest version when multiple versions are active. To use the latest version, clone the repository into your plugins folder
$ git clone [email protected]:Prospress/action-scheduler.git
$ wp plugin activate action-scheduler
@rrennick is Woo core not running the latest version? Seems like we should get that in for 3.6 if we are behind.
A new version of AS was released 2 weeks ago - https://github.com/Prospress/action-scheduler/pull/233. The latest version is in WooCommerce Subscriptions 2.5.X so we should find if there were any bugs in the latest that way.
The main advantage to using the repo is that as I work on AS we can test as needed with git pull.
@rrennick @timmyc It looks like we need to open a PR to get Action Scheduler 2.2.0 in 3.6 still, is that correct? I see that we are still running 2.1.0 on master there.
@justinshreve Yes, that's on my todo list. We want to give it a bit more time in subscriptions before proceeding with updating in WC.
@rrennick with 2.2.3 in core for 3.6 ( https://github.com/woocommerce/woocommerce/pull/23162 ) can we now work on this? If so I'll drop it into the next sprint again.
@timmyc We have done as much on this as we can until we get to AS 3.0.0. The WCA scheduled tasks run in their own group at a lower priority. Unless an install has a custom data store similar to what's in WCA, the WCA scheduled tasks will only run if there are no other pending jobs.
馃憤 I will put this in the backlog then, with a blocked status on AS 3.0
@rrennick Is this something that should be complete before a merge to core?
Is this something that should be complete before a merge to core?
The async runner and custom tables in 3.0.0 should handle actions at a rate that prioritizing them shouldn't be necessary.