src/Shell/CakeResqueShell.php
public function enqueue()
    {
        $this->out('<info>' . __d('cake_resque', 'Adding a job to worker') . '</info>');
        if (count($this->args) !== 3) {
            $this->err('<error>' . __d('cake_resque', 'Wrong number of arguments') . '</error>');
            $this->out(__d('cake_resque', 'Usage : enqueue <queue> <jobclass> <comma-separated-args>'), 2);

            return false;
        }

        $result = CakeResque::enqueue($this->args[0], $this->args[1], explode(',', $this->args[2]));

        $this->out('<success>' . __d('cake_resque', 'Succesfully enqueued Job #{0}', $result) . '</success>');

        $this->out('');
    }
public function enqueue()
    {
        $this->out('<info>' . __d('cake_resque', 'Adding a job to worker') . '</info>');
        if (count($this->args) !== 3) {
            $this->err('<error>' . __d('cake_resque', 'Wrong number of arguments') . '</error>');
            $this->out(__d('cake_resque', 'Usage : enqueue <queue> <jobclass> <comma-separated-args>'), 2);

            return false;
        }

        $result = CakeResque::enqueue($this->args[0], $this->args[1], explode(',', $this->args[2]));

        $this->out('<success>' . __d('cake_resque', 'Succesfully enqueued Job #{0}', $result) . '</success>');

        $this->out('');
    }
public function enqueue ( ) { $ this -> out ( '<info>' . __d ( 'cake_resque' , 'Adding a job to worker' ) . '</info>' ) ; if ( count ( $ this -> args ) !== 3 ) { $ this -> err ( '<error>' . __d ( 'cake_resque' , 'Wrong number of arguments' ) . '</error>' ) ; $ this -> out ( __d ( 'cake_resque' , 'Usage : enqueue <queue> <jobclass> <comma-separated-args>' ) , 2 ) ; return false ; } $ result = CakeResque :: enqueue ( $ this -> args [ 0 ] , $ this -> args [ 1 ] , explode ( ',' , $ this -> args [ 2 ] ) ) ; $ this -> out ( '<success>' . __d ( 'cake_resque' , 'Succesfully enqueued Job #{0}' , $ result ) . '</success>' ) ; $ this -> out ( '' ) ; }
Enqueue a job via CLI.

@return bool False if enqueueing fails.
Enqueue a job via CLI .