Skip to content
Snippets Groups Projects

Development

Merged Dominik Hebeler requested to merge development into master
43+ files
+ 36878
2025
Compare changes
  • Side-by-side
  • Inline
Files
43+
+ 4
1
@@ -51,6 +51,7 @@ class Searcher implements ShouldQueue
$this->counter = 0; // Counts the number of answered jobs
$time = microtime(true);
while(true){
Log:info("Durchlauf");
// Update the expire
Redis::expire($this->name, 5);
Redis::expire($this->name . ".stats", 5);
@@ -111,7 +112,7 @@ class Searcher implements ShouldQueue
* When a search engine needs more time to produce search results than the timeout of the MetaGer process, we won't even bother of spawning
* more and more Searchers because they would just block free worker processes from serving the important engines which will give results in time.
**/
if($this->counter === 3){
if($this->counter === 3 || getenv("QUEUE_DRIVER") === "sync"){
# If the MetaGer process waits longer for the results than this Fetcher will probably need to fetch
# Or if this engine is in the array of important engines which we will always try to serve
Redis::set($this->name, "running");
@@ -151,6 +152,8 @@ class Searcher implements ShouldQueue
private function storeResult($result, $poptime, $hashValue){
Redis::hset('search.' . $hashValue, $this->name, $result);
// After 60 seconds the results should be read by the MetaGer Process and stored in the Cache instead
Redis::expire('search.' . $hashValue, 60);
$this->lastTime = microtime(true);
}
Loading