-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible bug Artisan::queue() with queue:work "The option does not exist" #17487
Comments
UPDATE: changing to optional OR required arguments yields the same issue protected $signature = 'make:module
{slug : The slug of the module}
{owner? : The owner}
{group? : The group}
{--quick : Skip the make:module wizard and use default values}';
protected $signature = 'make:module
{slug : The slug of the module}
{owner : The owner}
{group : The group}
{--quick : Skip the make:module wizard and use default values}';
Artisan::queue('make:module', [
'slug' => strtolower($name),
'owner' => $owner,
'group' => $group,
'--quick' => true
]); REMINDER: the command works perfectly fine via terminal manually and the below works fine: Artisan::queue('make:module', [
'slug' => strtolower($name),
//'owner' => $owner,
//'group' => $group,
'--quick' => true
]); |
Parser Tests don't seem to cover this scenario
Running this test PASSES: (Which confuses me even more)
public function testMakeModuleParsing()
{
$results = Parser::parse('make:module
{slug : The slug of the module}
{owner : The owner}
{group : The group}
{--quick : Skip the make:module wizard and use default values}');
$this->assertEquals('make:module', $results[0]);
$this->assertEquals('slug', $results[1][0]->getName());
$this->assertEquals('owner', $results[1][1]->getName());
$this->assertEquals('group', $results[1][2]->getName());
$this->assertEquals('quick', $results[2][0]->getName());
$this->assertFalse($results[2][0]->acceptValue());
} |
I think i have figured this issue out: Code changes are not registered to the queue worker do to the queue:work bootstraping the applications state. The documentation does state this. Issuing this command after making the changes to code seems to have solved the issue.
|
@poppabear8883 Very good! Thanks for sharing. |
5.3.29
5.6.27
mysql Ver 14.14 Distrib 5.7.16, for Linux (x86_64) using EditLine wrapper
Description:
Steps To Reproduce:
Note 1: the command works perfectly fine via terminal manually
Note 2: takeing out --owner and --group the command works:
Supervisor configuration
Note: The reason that the worker runs as root user is that my jobs/commands require certain tasks to be done as the root user. The nature of this project is a server management interface. Hopefully that sheds some light to the type of methods i am trying to apply.
The text was updated successfully, but these errors were encountered: