Commit 67655e9b authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

do not stop request fetcher before all jobs completed

parent 8f6e9bd7
......@@ -72,7 +72,7 @@ class RequestFetcher extends Command
}
try {
while ($this->shouldRun) {
while (true) {
Redis::set(self::HEALTHCHECK_KEY, Carbon::now()->format(self::HEALTHCHECK_FORMAT));
$operationsRunning = true;
curl_multi_exec($this->multicurl, $operationsRunning);
......@@ -84,6 +84,9 @@ class RequestFetcher extends Command
if ($newJobs === 0 && $answersRead === 0) {
usleep(10 * 1000);
}
if (!$this->shouldRun && $operationsRunning === 0) {
break;
}
}
} finally {
curl_multi_close($this->multicurl);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment