futtta / ao_critcss_aas

Autoptimize power-up to integrate with criticalcss.com
9 stars 1 forks source link

job queue worries (was: deal with too big a queues) #34

Closed futtta closed 6 years ago

futtta commented 6 years ago

some users are reporting huge queues (I suppose they're on slow hosts and more items are added then there are processed, to be looked into).

but to keep things manageable (or to give users some control over this), we could look into:

futtta commented 6 years ago

feedback welcome @denydias

denydias commented 6 years ago

First things first: define 'huge'. How many jobs you consider a huge queue?

futtta commented 6 years ago

Hundreds - thousands

On Mon, 18 Jun 2018, 07:49 Deny Dias, notifications@github.com wrote:

First things first: define 'huge'. How many jobs ou consider a huge queue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/futtta/ao_critcss_aas/issues/34#issuecomment-397948492, or mute the thread https://github.com/notifications/unsubscribe-auth/AALEMZPcGFuVE_ceZhgITkj1_00dCRGeks5t9z92gaJpZM4UrKn3 .

denydias commented 6 years ago

Hummm... I think that the solution for hundreds and thousands of jobs in the queue is to decrease the time between queue runs. Maybe ask those users with huge queues to install something like wp-control so they can change the default queue interval from 10 minutes to, let's say, five, three or even one minute.

The thing to clear the queue or purge N jobs falls into the category of inefficiency. The plugin will recreate those jobs anyway. As such this will be a tool so a user can fool himself. It's pure eye candy.

If the size of the queue is something to bother, we should just hide the queue somewhere in the UI. Jobs are far less important than rules.

futtta commented 6 years ago

job queue is now hidden when there is one (or more) AUTO rules, see https://github.com/futtta/ao_critcss_aas/commit/8fe7c9844be0f8fd86902b23b52a1f6396ff3d40

futtta commented 6 years ago

I'm reconsider auto-purging old(er) N jobs as I saw a user with 1111 jobs, some of which were 5 days old already even though, given the fact he does have AUTO rules, cron is working.

Even if the jobs-panel is hidden and psychological impact is somewhat mitigated, having that amount of N jobs means that the plugin is constantly "running behind the facts" and that the hash stored in the job might already be not be correct any more when the CCSS is actually requested, leading to the job being re-created with a new hash which potentially is incorrect again when the job gets executed ... ad infinitum ....