You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a 20-second cron schedule could overwhelm the site’s resources with overlapping cron tasks on a high-traffic site.
While I realize this 20-second cron is important when setting up a site to ensure plugins are properly installed during onboarding, I don't think we should retain this cron schedule past onboarding.
'display' => __( 'Cron to run once every ten minutes' ),
);
}
return$schedules;
}
The existing cleanup task should happen on the pre-existing 15-minute cron instead of adding a new 10-minute cron.
We should remove the 20-second cron and make it possible to configure custom cron schedules to handle different groups/types of tasks at different intervals.
The text was updated successfully, but these errors were encountered:
Ultimately, I think we don't have enough classes to represent all the concepts and dependencies that we really want. I think we should probably have the following:
Connection - for now, just a DatabaseConnection; handles reading and writing to data source
QueryFilter - applied to a connection to allow it to pull only a specific subset of all entries (e.g. tasks by name, or if we change how we do things it could be a Job class name)
QueueType (one of Queue, Stack, PriorityQueue) - Handles prioritization of tasks, is essentially an application of a QueryFilter focused primarily on sorting.
Schedule - (one of Interval or Event) Handles setting up cron schedules or one-off events. We could have existing classes that correspond to the pre-existing cron intervals in WordPress (QuarterHourInterval, HourlyInterval, etc)
Worker - Takes a connection, schedule, queue type, and (optionally) query filter(s). Handles registration of new tasks, processing tasks, checking task status, recording results, decrementing retries, etc.
Job/Task - Individual unit of work. We should have a standard way of registering these. I like how the wp-queue package does it. Ideally would be extended for each job type.
Job/Task Result - Handles storing and fetching of results, mostly standalone, but would rely on a connection type.
Having a 20-second cron schedule could overwhelm the site’s resources with overlapping cron tasks on a high-traffic site.
While I realize this 20-second cron is important when setting up a site to ensure plugins are properly installed during onboarding, I don't think we should retain this cron schedule past onboarding.
wp-module-tasks/includes/Scheduler.php
Lines 36 to 59 in a7d309c
The existing cleanup task should happen on the pre-existing 15-minute cron instead of adding a new 10-minute cron.
We should remove the 20-second cron and make it possible to configure custom cron schedules to handle different groups/types of tasks at different intervals.
The text was updated successfully, but these errors were encountered: