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

Please keep push queue logic moving forward #22

Closed
Austinb opened this issue Jul 15, 2017 · 1 comment
Closed

Please keep push queue logic moving forward #22

Austinb opened this issue Jul 15, 2017 · 1 comment

Comments

@Austinb
Copy link

Austinb commented Jul 15, 2017

As of Laravel 5.2 the Queue::marshal method was removed but you can still make the old push queue technique work so I wanted to make sure this functionality remains since it has been flagged as deprecated in the library. I also wanted to thank you for keeping the old code thus far.

For those of you who need push queue on shared hosting where you cant run proper queues or daemons and don't want to run some hacky cron job launching of the daemon here are some instructions.

  1. Install this library and set it up as stated in the readme
  2. In your routes/api.php add something like the following to listen for the incoming iron.io POST request.
// Handle the push queue from iron.io
Route::post('iron', function ()
{
    return Queue::connection('iron')->marshal();
});

Note: this route will not work in routes/web.php as those routes require CSRF token validation which will fail as iron.io does not have a token to send back nor a session to check the token against.

  1. When you create a queue in iron.io set it to anything but pull. Your subscriber URL will be http(s)://your_domain.com/api/iron and save. You can make the path whatever you want but make sure you append /api/ to the front of the path when adding the url into iron.io.

When the /api/iron path is called it will invoke the old style push Queue::Marshal call from the older versions of Laravel that have been removed. Try it out and feel free to message me if you have any issues. I have been testing this for about a day and it is working as expected thus far.

@trideout
Copy link
Collaborator

For the time being the plan is to keep deprecated functionality until it is officially removed from support. I have no plans to implement deprecated functionality into the library when it is removed, however I am not against taking pull requests to re-implement functionality.

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