setInterval(60 * 60 * 24); // can be deferred to maintenance window $this->setTimeSensitivity(self::TIME_INSENSITIVE); $this->appData = $appDataFactory->get('core'); } /** * @inheritDoc */ protected function run($argument): void { try { $this->taskMapper->deleteOlderThan(self::MAX_TASK_AGE_SECONDS); } catch (\OCP\DB\Exception $e) { $this->logger->warning('Failed to delete stale task processing tasks', ['exception' => $e]); } try { $this->clearFilesOlderThan($this->appData->getFolder('text2image'), self::MAX_TASK_AGE_SECONDS); } catch (NotFoundException $e) { // noop } try { $this->clearFilesOlderThan($this->appData->getFolder('audio2text'), self::MAX_TASK_AGE_SECONDS); } catch (NotFoundException $e) { // noop } try { $this->clearFilesOlderThan($this->appData->getFolder('TaskProcessing'), self::MAX_TASK_AGE_SECONDS); } catch (NotFoundException $e) { // noop } } /** * @param ISimpleFolder $folder * @param int $ageInSeconds * @return void */ private function clearFilesOlderThan(ISimpleFolder $folder, int $ageInSeconds): void { foreach ($folder->getDirectoryListing() as $file) { if ($file->getMTime() < time() - $ageInSeconds) { try { $file->delete(); } catch (NotPermittedException $e) { $this->logger->warning('Failed to delete a stale task processing file', ['exception' => $e]); } } } } } value='dependabot/gradle/com.github.spotbugs-6.0.27'>dependabot/gradle/com.github.spotbugs-6.0.27 Mirror of Apache POI: https://github.com/apache/poiwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/sl/draw/DrawConnectorShape.java
blob: bb973f5f8a3304819c8eb48333c8a5809737a9ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26