Skip to content

console: actually end when _end() is called#7

Merged
engram-design merged 1 commit intoverbb:craft-5from
d--j:fix-console
Jan 25, 2025
Merged

console: actually end when _end() is called#7
engram-design merged 1 commit intoverbb:craft-5from
d--j:fix-console

Conversation

@d--j
Copy link
Contributor

@d--j d--j commented Jan 24, 2025

Fixes errors like

Checking scheduled jobs ...

No jobs are due to run.
Exception 'Error' with message 'Call to a member function getTimestamp() on bool'

in /var/www/html/vendor/verbb/scheduler/src/console/controllers/CommandController.php:58

Stack trace:
#0 [internal function]: verbb\scheduler\console\controllers\CommandController->actionRun()
#1 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#2 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#3 /var/www/html/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('run', Array)
#4 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('run', Array)
#5 /var/www/html/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('scheduler/comma...', Array)
#6 /var/www/html/vendor/craftcms/cms/src/console/Application.php(91): yii\console\Application->runAction('scheduler/comma...', Array)
#7 /var/www/html/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('scheduler/comma...', Array)
#8 /var/www/html/vendor/craftcms/cms/src/console/Application.php(122): yii\console\Application->handleRequest(Object(craft\console\Request))
#9 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request))
#10 /var/www/html/craft(13): yii\base\Application->run()
#11 {main}

Should I backport this fix to Craft 3/4, too?

@engram-design
Copy link
Member

Must have missed that, and thanks for this, looks great. Backporting to Craft 3/4 would be amazing, only if you feel up to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants