DJJob.php
public static function enqueue($handler, $queue = "default", $run_at = null) {
        $affected = self::runUpdate(
            "INSERT INTO " . self::$jobsTable . " (handler, queue, run_at, created_at) VALUES(?, ?, ?, NOW())",
            array(serialize($handler), (string) $queue, $run_at)
        );

        if ($affected < 1) {
            self::log("[JOB] failed to enqueue new job", self::ERROR);
            return false;
        }

        return self::getConnection()->lastInsertId(); // return the job ID, for manipulation later
    }
public static function enqueue($handler, $queue = "default", $run_at = null) {
        $affected = self::runUpdate(
            "INSERT INTO " . self::$jobsTable . " (handler, queue, run_at, created_at) VALUES(?, ?, ?, NOW())",
            array(serialize($handler), (string) $queue, $run_at)
        );

        if ($affected < 1) {
            self::log("[JOB] failed to enqueue new job", self::ERROR);
            return false;
        }

        return self::getConnection()->lastInsertId(); // return the job ID, for manipulation later
    }
public static function enqueue ( $ handler , $ queue = "default" , $ run_at = null ) { $ affected = self :: runUpdate ( "INSERT INTO " . self :: $ jobsTable . " (handler, queue, run_at, created_at) VALUES(?, ?, ?, NOW())" , array ( serialize ( $ handler ) , ( string ) $ queue , $ run_at ) ) ; if ( $ affected < 1 ) { self :: log ( "[JOB] failed to enqueue new job" , self :: ERROR ) ; return false ; } return self :: getConnection ( ) -> lastInsertId ( ) ; // return the job ID, for manipulation later }
Enqueues a job to the database.

@param object $handler The handler that can execute this job.
@param string $queue The queue to enqueue this job to. All queues are saved in the same table.
@param string $run_at A valid mysql DATETIME string at which to run the jobs.

@return bool|string Returns the last inserted ID or false if enqueuing failed.
Enqueues a job to the database .