I've installed

drupal 8.1.6

&

search_api 8x

cd modules/contrib/search_api
git log | head
	commit 2f7941b8f85b064012d7e41e3e8f284d373c8ca0
	Author: Pieter Frenssen <pieter@frenssen.be>
	Date:   Sun Jun 26 12:09:22 2016 +0200

	    Check the Composer version before downloading the dependencies (#170)

	commit 6bc31af558f0fbf2fe2a19ddad4680c894b56490
	Author: Jesus Manuel Olivas <jesus.olivas@gmail.com>
	Date:   Tue Jun 21 15:30:54 2016 -0700

as reported @

Port drush commands to Drupal 8
https://www.drupal.org/node/2665728#comment-11395053

an error appears in a backtraces that's ascribed to

As you can see in the backtrace, that's an exception thrown by search_api that is apparently broken. Has nothing to do with this issue, it just triggers it.

here's the specific exec, with error and source

	drush cron-run search_api_cron 
		Error: Call to undefined method Drupal\ultimate_cron\Entity\CronJob::launch() in  [error]
		drush_ultimate_cron_cron_run() (line 347 of
		/web/d8/web/modules/contrib/ultimate_cron/ultimate_cron.drush.inc).
		Error: Call to undefined method Drupal\ultimate_cron\Entity\CronJob::launch() in /web/d8/web/modules/contrib/ultimate_cron/ultimate_cron.drush.inc on line 347
		Error: Call to undefined method Drupal\ultimate_cron\Entity\CronJob::launch() in drush_ultimate_cron_cron_run() (line 347 of /web/d8/web/modules/contrib/ultimate_cron/ultimate_cron.drush.inc).
		Drush command terminated abnormally due to an unrecoverable error.                [error]

	cat /web/d8/web/modules/contrib/ultimate_cron/ultimate_cron.drush.inc
		...
		  else {
		    // Run a specific job.
		    $job = CronJob::load($name);

		    if (!$job) {
		      return drush_set_error(dt('@name not found', array('@name' => $name)));
		    }

		    if ($force || $job->isScheduled()) {
	347	      $job->launch();
		    }
		  }
		}
		...
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

g18724 created an issue. See original summary.

drunken monkey’s picture

Project: Search API » Ultimate Cron
Component: General code » Code
Priority: Major » Normal

issThat doesn't seem like a Search API problem, but like a problem of the ultimate_cron module. Does this also happen if you try to invoke another module's cron hook? (Looks like it would.)
In general, there is nothing in your bug report that points to Search API as being the culprit here.

I'm moving this to the Ultimate Cron issue queue to see whether they have an idea what could be wrong there.

rgpublic’s picture

Line 347 is wrong in ultimate_cron.drush.inc. Instead of $job->launch() it should probably read $job->run()

rgpublic’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Bambell’s picture

Status: Active » Needs review
FileSize
336 bytes

Thanks for your feedback @rgpublic. I confirm that launch() doesn't exist and the hook is successfully invoked when calling run() instead.

Status: Needs review » Needs work

The last submitted patch, 5: exception_thrown_by-2765125-5.patch, failed testing.

  • Berdir committed 75d190f on 8.x-2.x authored by Bambell
    Issue #2765125 by Bambell, rgpublic: Drush ultimate cron run calls...
Berdir’s picture

Title: exception thrown by search_api, invoked in drush cron-run » Drush ultimate cron run calls launch() instead of run()
Status: Needs work » Fixed

Makes sense. Thanks, committed.

Status: Fixed » Closed (fixed)

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