Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
vitgrams committed Nov 27, 2024
1 parent 6fa4ecb commit 0aaaec8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ protected function mergeTempDocumentation(): void

$parallelToken = ParallelTesting::token();

$sharedDocContent = json_decode(stream_get_contents($lockHandle), true);
$workerDocContent = json_decode(file_get_contents(storage_path("/temp_documentation_{$parallelToken}.json")));
$sharedDocContent = json_decode(stream_get_contents($lockHandle) ? stream_get_contents($lockHandle) : [], true);
$workerDocContent = json_decode(file_get_contents(storage_path("/temp_documentation_{$parallelToken}.json")), true);

app(SwaggerService::class)->mergeOpenAPIDocs($sharedDocContent, $workerDocContent);

fwrite($lockHandle, json_encode($sharedDocContent));

flock($lockHandle, LOCK_UN);
}
}

0 comments on commit 0aaaec8

Please sign in to comment.