This commit is contained in:
2021-03-19 19:08:55 +08:00
parent 1c3fb35737
commit 8d5a66e16b
+2 -3
View File
@@ -95,16 +95,15 @@ class Crontab extends Component
/**
* @param Crontab $crontab
* @throws Exception
*/
public function dispatch(Crontab $crontab)
public function dispatch()
{
$redis = Snowflake::app()->getRedis();
$executeTime = $this->tickTime + time();
$redis->zAdd('system:crontab', (string)$executeTime, serialize($crontab));
$redis->zAdd('system:crontab', (string)$executeTime, serialize($this));
}