public function sendmail() { $users_checked = Input::get('users'); if (is_array($users_checked)) { $queue_name = $this->option('queue_name'); $payload = array('ids' => $users_checked); $mgs_id = Queue::pushRaw($payload, $queue_name); $response = array('status' => 'success', 'msg' => "Task id = {$mgs_id}"); } else { $response = array('status' => 'failed', 'msg' => 'No users checked'); } return \Response::json($response); }
public function fire() { $queue_name = $this->option('queue_name'); // //Post message via IronMQ lib - https://github.com/iron-io/iron_mq_php // $mq = new \IronMQ(array( // 'token' => Config::get('queue.connections.iron.token', 'xxx'), // 'project_id' => Config::get('queue.connections.iron.project', 'xxx') // )); // //Every payload must be crypted, worker will decrypt it. // $mq->postMessages($queue_name, array( // $this->encryptPayload("This is Hello World payload_1"), // $this->encryptPayload("This is Hello World payload_2") // ) // ); //Post message via Laravel Queue class Queue::pushRaw("This is Hello World payload :)", $queue_name); $this->info("<info>Message pushed to the <comment>{$queue_name}</comment> queue.</info>"); }
public function fire() { $queue_name = $this->option('queue_name'); $this->info(Queue::pushRaw(array('ids' => array("1,2")), $queue_name)); }