Skip to content

Commit

Permalink
Add note about serializing objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 25, 2014
1 parent 52682d0 commit efd541a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions queues.md
Expand Up @@ -127,6 +127,8 @@ You may also push a Closure onto the queue. This is very convenient for quick, s
$job->delete();
});

> **Note:** Instead of making objects available to queued Closures via the `use` directive, consider passing primary keys and re-pulling the associated models from within your queue job. This often avoids unexpected serialization behavior.
When using Iron.io [push queues](#push-queues), you should take extra precaution queueing Closures. The end-point that receives your queue messages should check for a token to verify that the request is actually from Iron.io. For example, your push queue end-point should be something like: `https://yourapp.com/queue/receive?token=SecretToken`. You may then check the value of the secret token in your application before marshalling the queue request.

<a name="running-the-queue-listener"></a>
Expand Down

0 comments on commit efd541a

Please sign in to comment.