Closed (fixed)
Project:
Ultimate Cron
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
18 May 2016 at 21:59 UTC
Updated:
10 May 2020 at 05:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
abhishek-anand commentedComment #3
abhishek-anand commentedAdded a service for queueCallback
Modified CronJob to detect a callback as service and resolve it into a callable
TODO: inject ClassResolverInterface into CronJob
Comment #4
berdirLooks like you're on track.
should be :, not .?
not sure if we really need an interface for this.
Naming should be QueueWorkerInterface or so, not Manager.
Comment #5
abhishek-anand commentedComment #7
abhishek-anand commentedComment #8
berdirThanks, functionality looks good, needs a bit of cleanup/docs.
Are those actually used?
not needed anymore.
We don't use @package, should have an actual description.
the first line seems a bit pointless, repeates the class name and it's not a definition. I personally am OK with just leaving out the description, just keep the @var. Or add a proper description like "Queue worker plugin manager". Same for those below.
missing empty line, constructurs usually have @param docs for their arguments, but I can live with them not fully defined.
missing docblock.
There should be some unused use statements now in this file.
Comment #9
berdirComment #10
abhishek-anand commentedFixed the above issues.
Comment #11
berdirNeeds a reroll
Comment #12
berdirRerolled.
Comment #14
berdirComment #16
jatinkumar1989 commentedHi,
I updated my module, but getting this error
drupal core: drupal 8.4.2
ultimate_cron version: '8.x-2.0-alpha2'
Warning: call_user_func() expects parameter 1 to be a valid callback, function 'ultimate_cron_queue_callback' not found or invalid function name in Drupal\ultimate_cron\Entity\CronJob->invokeCallback() (line 316 of /var/www/XXXXX/docroot/modules/contrib/ultimate_cron/src/Entity/CronJob.php)
any idea why i am getting this warning in logs.
Thanks in advance
Comment #17
sokru commentedI'll get same error with latest -dev version.
Warning: call_user_func() expects parameter 1 to be a valid callback, function 'ultimate_cron_queue_callback' not found or invalid function name in Drupal\ultimate_cron\Entity\CronJob->invokeCallback() (line 316Comment #18
sokru commentedIn my case it was missing module.
Way to reproduce:
1) Install update module and ultimate_cron, creates
ultimate_cron.job.update_cron2) Uninstall update module, but do not manually remove this cron job from UI.
3) In 15 minutes you'll get error mentioned.
Comment #19
fdverwoerd commentedI got the same error as in #17, but somehow when I added depencies in .info.yml to the module containing the ultimate cron callback it started pickin it up (so it was already installed)? So adding a decency like `custom_module:custom_module` made sure the callback was found. Something when callback is a service perhaps? I don't understand it.
Comment #20
rahul_ commented#17 Same issue I am facing in cron job log,
I have just disable the cron job for a moment and once again enable, and this error facing in log.
Could you please suggest me the solution for it.
Thanks in advance.