This commit is contained in:
2021-04-15 20:11:16 +08:00
parent bd7b3b5edd
commit df974e4b08
+5
View File
@@ -204,6 +204,7 @@ abstract class Crontab extends BaseObject
*/ */
public function execute(): void public function execute(): void
{ {
try {
$redis = Snowflake::app()->getRedis(); $redis = Snowflake::app()->getRedis();
$name_md5 = $this->getName(); $name_md5 = $this->getName();
@@ -220,8 +221,12 @@ abstract class Crontab extends BaseObject
'name' => $this->name, 'name' => $this->name,
'response' => serialize($params) 'response' => serialize($params)
])); ]));
} catch (\Throwable $throwable) {
logger()->addError($throwable, 'throwable');
} finally {
$this->after(); $this->after();
} }
}
/** /**