diff --git a/System/Application.php b/System/Application.php index 990e57be..df3bcd3f 100644 --- a/System/Application.php +++ b/System/Application.php @@ -56,9 +56,7 @@ class Application extends BaseApplication $this->import(DatabasesProviders::class); $this->import(ServerProviders::class); - if (Config::get('crontab.enable') !== true) { - $this->import(CrontabProviders::class); - } + $this->import(CrontabProviders::class); } diff --git a/System/Crontab/CrontabProviders.php b/System/Crontab/CrontabProviders.php index 32450c8c..c319c647 100644 --- a/System/Crontab/CrontabProviders.php +++ b/System/Crontab/CrontabProviders.php @@ -23,11 +23,10 @@ class CrontabProviders extends Providers public function onImport(Application $application) { $server = $application->getServer(); + $application->set('crontab', ['class' => Producer::class]); if (Config::get('crontab.enable') !== true) { return; } - $application->set('crontab', ['class' => Producer::class]); - $server->addProcess('CrontabZookeeper', ZookeeperProcess::class); $server->addProcess('Consumer', Consumer::class); }