Skip to content

Commit a560a97

Browse files
authored
fix: do not add the queue files again on disable+enable of the app (#237)
Signed-off-by: kyteinsky <kyteinsky@gmail.com>
1 parent 8b8eb42 commit a560a97

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/Repair/AppInstallStep.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,15 @@ public function run(IOutput $output): void {
3737
if ($this->appConfig->getAppValueInt('installed_time', 0, lazy: true) === 0) {
3838
$this->logger->info('Setting up Context Chat for the first time');
3939
$this->appConfig->setAppValueInt('installed_time', time(), lazy: true);
40+
41+
// do not add SchedulerJob on every enable of the app
42+
// so files are not added to the queue again when app is disabled and enabled
43+
// in normal operation
44+
$this->jobList->add(SchedulerJob::class);
4045
}
4146

4247
$providerConfigService = new ProviderConfigService($this->appConfig);
4348
/** @psalm-suppress ArgumentTypeCoercion, UndefinedClass */
4449
$providerConfigService->updateProvider('files', 'default', '', true);
45-
46-
$this->jobList->add(SchedulerJob::class);
4750
}
4851
}

0 commit comments

Comments
 (0)