Commit a71e8c85 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '576-uberflussige-debug-logs-entfernen' into 'development'

Resolve "Überflüssige Debug Logs entfernen"

Closes #576

See merge request !1022
parents c0f1555c 799594ab
...@@ -6,7 +6,6 @@ use App\Jobs\Searcher; ...@@ -6,7 +6,6 @@ use App\Jobs\Searcher;
use App\MetaGer; use App\MetaGer;
use Cache; use Cache;
use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Bus\DispatchesJobs;
use Log;
use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Redis;
abstract class Searchengine abstract class Searchengine
...@@ -200,7 +199,6 @@ abstract class Searchengine ...@@ -200,7 +199,6 @@ abstract class Searchengine
# Entfernt wenn gesetzt das disabled="1" für diese Suchmaschine aus der sumas.xml # Entfernt wenn gesetzt das disabled="1" für diese Suchmaschine aus der sumas.xml
public function enable($sumaFile, $message) public function enable($sumaFile, $message)
{ {
Log::info($message);
$xml = simplexml_load_file($sumaFile); $xml = simplexml_load_file($sumaFile);
unset($xml->xpath("//sumas/suma[@name='" . $this->name . "']")['0']['disabled']); unset($xml->xpath("//sumas/suma[@name='" . $this->name . "']")['0']['disabled']);
$xml->saveXML($sumaFile); $xml->saveXML($sumaFile);
...@@ -237,11 +235,9 @@ abstract class Searchengine ...@@ -237,11 +235,9 @@ abstract class Searchengine
$body = ""; $body = "";
if ($this->canCache && $this->cacheDuration > 0 && Cache::has($this->hash)) { if ($this->canCache && $this->cacheDuration > 0 && Cache::has($this->hash)) {
Log::info("Aus dem Cache: " . $this->hash);
$body = Cache::get($this->hash); $body = Cache::get($this->hash);
} elseif (Redis::hexists('search.' . $this->resultHash, $this->name)) { } elseif (Redis::hexists('search.' . $this->resultHash, $this->name)) {
$body = Redis::hget('search.' . $this->resultHash, $this->name); $body = Redis::hget('search.' . $this->resultHash, $this->name);
Log::info("Schon vorhanden: " . $this->resultHash . "\n" . $body);
Redis::hdel('search.' . $this->resultHash, $this->name); Redis::hdel('search.' . $this->resultHash, $this->name);
if ($this->canCache && $this->cacheDuration > 0) { if ($this->canCache && $this->cacheDuration > 0) {
Cache::put($this->hash, $body, $this->cacheDuration); Cache::put($this->hash, $body, $this->cacheDuration);
......
Markdown is supported
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