public static function enqueue($queue, $class, $args = [], $trackStatus = null)
    {
        if ($trackStatus === null) {
            $trackStatus = Configure::read('CakeResque.Job.track');
        }

        if (!is_array($args)) {
            $args = [$args];
        }

        $r = call_user_func_array(self::$resqueClass . '::enqueue', array_merge([$queue], [$class], [$args], [$trackStatus]));

        if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {
            $caller = version_compare(PHP_VERSION, '5.4.0') >= 0
                ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)
                : debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        } else {
            $caller = debug_backtrace();
        }

        self::$logs[ $queue ][] = [
            'queue'  => $queue,
            'class'  => $class,
            'method' => array_shift($args),
            'args'   => $args,
            'jobId'  => $r,
            'caller' => $caller,
        ];

        return $r;
    }