start(); } catch (\Throwable $e) { $this->failed("start", $e); } } /** * 重写完成事件 */ final public function finish() { try { $this->end(); } catch (\Throwable $e) { $this->failed("end", $e); } } /** * 任务失败事件 * @param string $type * @param \Throwable $e */ public function failed(string $type, \Throwable $e) { info($type); info($e); } }