Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Disque

 Disque

Lightning talk given at New York for CakeFest 2015

Mariano Iglesias

May 30, 2015
Tweet

More Decks by Mariano Iglesias

Other Decks in Programming

Transcript

  1. $ disque /etc/disque/7711.conf $ disque /etc/disque/7712.conf $ disque -p 7711

    127.0.0.1:7711> cluster meet 127.0.0.1 7712 OK 127.0.0.1:7711> HELLO 1) (integer) 1 2) "26a390eb07bba018a9ed0591b2110479f16bb19d" 3) 1) "26a390eb07bba018a9ed0591b2110479f16bb19d" 2) "127.0.0.1" 3) "7711" 4) "1" 4) 1) "9ccaa86ceaf032eeb67097d639b80315090f79d5" 2) "127.0.0.1" 3) "7712" 4) "1"
  2. $disque = new \Disque\Client([ '127.0.0.1:7111', '127.0.0.2:7112' ]); $job = new

    \App\Jobs\EmailJob([ 'email' => '[email protected]', 'template' => 'signed_up' ]); $disque->queue('emails')->push($job); $job = new \App\Jobs\RemindActivation($user); $disque->queue('emails')->schedule($job, new \DateTime('+1 week'));