Closed (fixed)
Project:
Ultimate Cron
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
29 Sep 2017 at 11:21 UTC
Updated:
4 Apr 2020 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kmoll commentedComment #3
kmoll commentedInitial port of drush commands to drush 9 syntax.
Comment #4
kmoll commentedComment #6
kmoll commentedoops uploaded wrong patch. This is the right one.
Comment #7
kmoll commentedComment #8
kmoll commentedI've updated the patch to move the drush command service to drush.services.yml to follow best practices.
Comment #10
gaëlgThanks kmoll! The previous patch did not work for "drush cron-run" (all jobs). Here's an update.
Comment #11
avogler commentedI manually tested the patch and it works for me. As far as I can tell the code looks solid.
+RTBC
Comment #12
gaëlgComment #13
avogler commentedSorry to reopen, but I found a minor bug. The --force option on cron-run was not working as $option was overwritten with $option['option]. I have attached a corrected patch.
Comment #14
Christopher Riley commentedAny word on getting this committed its been a couple of months and no word on this.
Comment #15
berdirThis copies the known an existing bugs from the current commands.
This doesn't make sense and it skips a ton of logic by not going through the runner.
Ther is no need for this option,use the core cron command instead.
The 9.x switch is a good moment to remove support for not passing a $name. just point reference the core command instead in the documentation.
Comment #16
gchauhan commentedHi all,
Adding the patch for drush9 commands. I have followed this blog.
Comment #17
rgpublicOk, #16 was of course trash, so I'm building on #13. I've added Berdir's wishes from #15. Do we need anything else to get this committed?
Comment #18
rgpublicCome to think of it, we should probably remove the second @usage annotation, right? I wonder: Do we still need the options at all? If yes, we might need a better example, because the --options=thread=1 doesnt make much sense to me in connection with a single cronjob run.
Comment #19
jsst commentedCould you explain how you intend to make it possible to run jobs in parallel?
For example, I would like to:
- run some import jobs in thread 1
- run some export jobs in thread 2
- run all other core jobs seperately
This patch currently seems unable to run threads, and when using 'core:cron' to run all other jobs, won't it run my import/export jobs as well? I don't want the core jobs to be waiting for imports!
Comment #20
rgpublicI'm now thinking this patch should be comitted as-is. Perfectionism all good and well, but in fact we don't have any usable ultimate_cron drush commands with Drush9 for over 2 years now. I'm using the patch without any major problems for quite some time. I think it's still better to be able to start cronjobs from CLI *at all* - even without any cool threading capabilities etc.
Comment #21
berdirRerolled.
Comment #23
berdirRemoved the second usage example and committed. If someone needs other options they can add them later on.