Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

All items go to default queue #12

Closed
Jmrich opened this issue Mar 9, 2016 · 4 comments
Closed

All items go to default queue #12

Jmrich opened this issue Mar 9, 2016 · 4 comments

Comments

@Jmrich
Copy link

Jmrich commented Mar 9, 2016

After upgrading to the latest version all queue items will only go to default queue.

Mail::queueOn('emails', 'emails.voicemail', $info, function ($message) use ($emailTo) {
            $message->to($emailTo->email, $emailTo->name)->subject('New Voicemail');
        });

I'm not sure what changed, but in v2 you could add items to different queues. So not sure if this is a conflict within iron-queue or laravel.

@carvefx
Copy link

carvefx commented Mar 15, 2016

Hi!

I've attempted to replicate the issue you're describing with a fresh install but was unable to.

My composer.json (relevant bits):

    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "laravelcollective/iron-queue": "5.2.*"
    },

in queue.php

'iron' => [
            'driver'  => 'iron',
            'host'    => 'mq-aws-eu-west-1-1.iron.io',
            'token'   => 'TOKEN_HERE',
            'project' => 'PROJECT_ID_HERE',
            'queue'   => 'my_test_queue',
            'timeout' => 60,
            'encrypt' => true,
],

and then as part of a test command:

    public function handle()
    {

        $data = ['title' => 'Some text here'];


        Mail::queueOn('my_second_test_queue', 'emails.test', $data, function ($message) {
             $message->to('[email protected]', 'John Appleseed')
                     ->subject('New Voicemail');
        });
    }

Please note that I'm pushing a mail job onto my_second_test_queue rather than the default in config my_test_queue

capture

@Jmrich
Copy link
Author

Jmrich commented Mar 15, 2016

That's weird. The app that it does it in was a fresh install as well. I
think the only difference is that all of my iron variables are in my env.
When I changed the default queue in the .env it would send it to the
default queue that was set but not to any others. I will check it again
later and see if I can replicate it.

John M. Richardson Jr
On Mar 15, 2016 10:50 AM, "Adrian Mihai" [email protected] wrote:

Hi!

I've attempted to replicate the issue you're describing with a fresh
install but was unable to.

My composer.json (relevant bits):

"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "laravelcollective/iron-queue": "5.2.*"
},

in queue.php

'iron' => [
'driver' => 'iron',
'host' => 'mq-aws-eu-west-1-1.iron.io',
'token' => 'TOKEN_HERE',
'project' => 'PROJECT_ID_HERE',
'queue' => 'my_test_queue',
'timeout' => 60,
'encrypt' => true,
],

and then as part of a test command:

public function handle()
{

    $data = ['title' => 'Some text here'];


    Mail::queueOn('my_second_test_queue', 'emails.test', $data, function ($message) {
         $message->to('[email protected]', 'John Appleseed')
                 ->subject('New Voicemail');
    });
}

Please note that I'm pushing a mail job onto my_second_test_queue rather
than the default in config my_test_queue

[image: capture]
https://cloud.githubusercontent.com/assets/346798/13788075/21b7d4a2-eae7-11e5-8150-fe4206e61d3e.PNG


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#12 (comment)

@Jmrich
Copy link
Author

Jmrich commented Mar 16, 2016

I retested and everything seems to be working fine now. I noticed that you had a field 'timeout' that I didn't have but when I updated to the latest version it gave me an error without it in there. I added it and then it worked fine, and went to the correct queue.

@carvefx
Copy link

carvefx commented Mar 16, 2016

Cool - this has been added in the latest version and is very likely unrelated.

If the issue is solved, please close it :)

@Jmrich Jmrich closed this as completed Mar 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants