This commit is contained in:
as2252258@163.com
2021-04-16 01:07:19 +08:00
parent e6cf428a2e
commit 175a5d5ec9
2 changed files with 5 additions and 5 deletions
+1 -4
View File
@@ -32,11 +32,8 @@ class Producer extends Component
throw new Exception('Cache key ' . self::CRONTAB_KEY . ' types error.');
}
$redis->setex('stop:crontab:' . $name, 120, 1);
$redis->del('crontab:' . $name);
$redis->zRem(static::CRONTAB_KEY, $name);
if ($redis->exists('crontab:' . $name)) {
$redis->del('crontab:' . $name);
}
$redis->zAdd(self::CRONTAB_KEY, time() + $crontab->getTickTime(), $name);
$redis->set('crontab:' . $name, swoole_serialize($crontab));