Problem/Motivation

Pretty simple idea. The Cron class could do with a bit of a tidy, everything just lives in the run() method. As well as just having a general spring clean, splitting some of the logic out to separate methods will allow better DX for people that want to swap this class out for their own class, extending the Drupal\Core\Cron class.

Proposed resolution

Separate some logic out into separate methods, maybe something like the addition of:

- setCronLastTime
- processQueues
- invokeCronHandlers

Remaining tasks

Reviews, consensus.

User interface changes

None

API changes

None

CommentFileSizeAuthor
#1 2249899.patch3.68 KBdamiankloip
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

damiankloip’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
3.68 KB

Something like this.

Status: Needs review » Needs work

The last submitted patch, 1: 2249899.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review

1: 2249899.patch queued for re-testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

nice!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit 463bf42 on 8.x by catch:
    Issue #2249899 by damiankloip: Refactor Drupal\Core\Cron.
    

Status: Fixed » Closed (fixed)

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