Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

mtift’s picture

Project: Accelerated Mobile Pages (AMP) » Ultimate Cron

I think you are referring to this: http://cgit.drupalcode.org/ultimate_cron/tree/plugins/ultimate_cron/laun.... Moving to that project's issue queue.

Berdir’s picture

Sorry, was on the wrong tab :)

Thanks for moving.

Berdir’s picture

Title: Remove drupal_set_message() in \Drupal\ultimate_cron\Plugin\ultimate_cron\Launcher\SerialLauncher::launch » Remove drupal_set_message() in \Drupal\ultimate_cron\Plugin\ultimate_cron\Launcher\SerialLauncher::launch and fix thread logging

Extending this to also figure out why it always reports them as being started manually

Berdir’s picture

Status: Active » Needs review
FileSize
3.84 KB

Ok, turns out this is because of the launch() indirection. So it creates a new scheduler instance and that doesn't have the current thread. There is a todo to statically cache those plugin instances but even then, it would still be per plugin.

There's a bigger problem there, but this resolves itself for now when we kill off that level of indirection and call $this->launch($job) instead of $job->launch() that would then do the same.

Berdir’s picture

Hello testbot?

Berdir’s picture

I guess I broke testbot by creating this in the wrong project first.

Anyway, here's a test only and combined patch that I tested locally.

  • Berdir committed 0734f5d on 8.x-2.x
    Issue #2731421 by Berdir: Remove drupal_set_message() in \Drupal\...
Berdir’s picture

Status: Needs review » Fixed

Committed. Lets hope this passes on testbot as well ;)

Status: Fixed » Closed (fixed)

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