1

I have a production Laravel website that uses Beanstalk as a queue driver.

Now, I've been asked to make a staging website on the same server, with all the same functionality of the production website.

I am worried about the queues and scheduled tasks. From what I see there is a single beanstalkd process on the server. If I start adding things to the queue from the staging server, then I am worried that the scheduled tasks from the production server pick that up and perform the queued actions (some of which might be very tricky, like billing users).

The staging server needs to have the real database from production in order to make sense, including real member data.

How do I set up the staging Laravel application to not collide with production in this regard, but have an identical database?

sveti petar
  • 3,637
  • 13
  • 67
  • 144

1 Answers1

0

You either have two connections setup with different default tubes, and based on ENV you can send messages to different tubes.

Or you have one single connection, but you specify a different tube. This way you have one set of tubes for live and another one for dev.

see some guidance here: https://laracasts.com/discuss/channels/general-discussion/queue-with-two-tubes

and: https://fideloper.com/ubuntu-beanstalkd-and-laravel4

Pentium10
  • 204,586
  • 122
  • 423
  • 502