Skip to content

Commit

Permalink
First test to fix #73
Browse files Browse the repository at this point in the history
  • Loading branch information
alexz707 committed Apr 26, 2024
1 parent 4232fe5 commit 816a831
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Controller/Document/PrintpageControllerBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,18 @@ public function activeGenerateProcessAction(Request $request): JsonResponse
$statusUpdate = Processor::getInstance()->getStatusUpdate($document->getId());
}


// Workaround for a bug which happens when the local filesystem is using a NFS with cache.
// This invalidates the cache and the file_exists() function returns the correct value.
// TODO: check if there are any side effects
try {
if ($dh = opendir(dirname($document->getPdfFileName()))) {
closedir($dh);
}
} catch (\Exception) {
}


return $this->adminJson([
'activeGenerateProcess' => !empty($inProgress),
'date' => $date,
Expand Down

0 comments on commit 816a831

Please sign in to comment.