// +---------------------------------------------------------------------- use think\facade\Queue; if (!function_exists('queue')) { /** * 添加到队列 * @param $job * @param string $data * @param int $delay * @param null $queue */ function queue($job, $data = '', $delay = 0, $queue = null) { if ($delay > 0) { Queue::later($delay, $job, $data, $queue); } else { Queue::push($job, $data, $queue); } } }