core/classes/Queue.class.php
public function push($job, $delay = 0, $vars = null){

        if($vars==null){
            $vars='disco-no-variable';
        }//if
        else {
            $vars = base64_encode(serialize($vars));
        }//el

        $domain = \App::domain();

        if($job instanceof \Closure){
            $obj = new \Jeremeamia\SuperClosure\SerializableClosure($job);
            $method = 'closure';
        }//if
        else if(stripos($job, '@') !== false){
            $obj = explode('@', $job);
            $method = $obj[1];
            $obj = $obj[0];
        }//elif
        else {
            $obj = $job;
            $method = 'work';
        }//el

        $obj = base64_encode(serialize($obj));

        $command = "php %1\$s/public/index.php resolve %2\$s '%3\$s' '%4\$s' %5\$s %6\$s > /dev/null 2>/dev/null &";

        $command = sprintf($command,
            \App::path(),
            $delay,
            $obj,
            $method,
            $vars,
            $domain
        );

        exec($command);

    }
public function push($job, $delay = 0, $vars = null){

        if($vars==null){
            $vars='disco-no-variable';
        }//if
        else {
            $vars = base64_encode(serialize($vars));
        }//el

        $domain = \App::domain();

        if($job instanceof \Closure){
            $obj = new \Jeremeamia\SuperClosure\SerializableClosure($job);
            $method = 'closure';
        }//if
        else if(stripos($job, '@') !== false){
            $obj = explode('@', $job);
            $method = $obj[1];
            $obj = $obj[0];
        }//elif
        else {
            $obj = $job;
            $method = 'work';
        }//el

        $obj = base64_encode(serialize($obj));

        $command = "php %1\$s/public/index.php resolve %2\$s '%3\$s' '%4\$s' %5\$s %6\$s > /dev/null 2>/dev/null &";

        $command = sprintf($command,
            \App::path(),
            $delay,
            $obj,
            $method,
            $vars,
            $domain
        );

        exec($command);

    }
public function push ( $ job , $ delay = 0 , $ vars = null ) { if ( $ vars == null ) { $ vars = 'disco-no-variable' ; } //if else { $ vars = base64_encode ( serialize ( $ vars ) ) ; } //el $ domain = \ App :: domain ( ) ; if ( $ job instanceof \ Closure ) { $ obj = new \ Jeremeamia \ SuperClosure \ SerializableClosure ( $ job ) ; $ method = 'closure' ; } //if else if ( stripos ( $ job , '@' ) !== false ) { $ obj = explode ( '@' , $ job ) ; $ method = $ obj [ 1 ] ; $ obj = $ obj [ 0 ] ; } //elif else { $ obj = $ job ; $ method = 'work' ; } //el $ obj = base64_encode ( serialize ( $ obj ) ) ; $ command = "php %1\$s/public/index.php resolve %2\$s '%3\$s' '%4\$s' %5\$s %6\$s > /dev/null 2>/dev/null &" ; $ command = sprintf ( $ command , \ App :: path ( ) , $ delay , $ obj , $ method , $ vars , $ domain ) ; exec ( $ command ) ; }
Push a job onto the Queue for processing.

@param \Closure|string $job Either a `\Closure` to execute or a Class method pair like `DB@query`.
@param int $delay The delay to wait before beginning execution of the `$job`.
@param null|string|array $vars The variables to pass to the `$job`.

@return void
Push a job onto the Queue for processing .