Not everybody can execute the Drush command on the live server, or install runit.
Lets have a variable to switch to processing the queue items via hook_cron(), enabled by default.

Cron

Comments

amitaibu’s picture

Work in branch 1914202

amitaibu’s picture

Status: Active » Needs review
StatusFileSize
new10.35 KB

Here's a good start. It includes changes to function names, as I want to remove the word Drush since items may be processed via cron (and in the future via batch API).

amitaibu’s picture

Title: Provide a poor-men solution via hook_cron() » Provide a poor-man's solution via hook_cron()
amitaibu’s picture

Let's just use a checkbox to say if should use cron or not.

amitaibu’s picture

Also default should be that hook_cron should be processed, as this will allow newbies to install it and use queued items.

amitaibu’s picture

StatusFileSize
new11.57 KB

Addressed #4 and #5, and added an entry in README.txt

amitaibu’s picture

StatusFileSize
new55.36 KB
amitaibu’s picture

Issue summary: View changes

Updated issue summary.

ekes’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new6.43 KB

I've been using this, 1914202 branch, now for writing tests on a module that extends advancedqueue. I've also been using it successfully on Pantheon and the same code is also running on a site using Drush advancedqueue-process-queue to work off the queue.

I've simplified the test that I was writing to just test the advancedqueue cron functionality. It requires the test becoming a module as it needs to add queues and a worker. Attached if it helps (git diff against 1914202 branch).

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1914202-advancedqueue-cron-tests.patch, failed testing.

ekes’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new18 KB

And the patch, with the previous issue patches, ie. against 7.x-1.x, just in case it keeps testbot happier.

ekes’s picture

Issue summary: View changes

Updated issue summary.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 1914202-advancedqueue-cron-tests-againsthead.patch, failed testing.

bojanz’s picture

Issue summary: View changes

Could someone reroll the patch?

bojanz’s picture

Status: Needs work » Fixed

Okay, I rerolled it, tests still pass, manual tests using Drush also fine. Pushed. Thanks!

  • Commit 3401916 on 7.x-1.x authored by Amitaibu, committed by bojanz:
    Issue #1914202 by ekes, Amitaibu: Provide a poor-man's solution via...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.