Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Merge requests
!888
Development
Code
Änderungen prüfen
Branch auschecken
Herunterladen
Patches
Unformatierter Diff
Merged
Development
development
into
master
Overview
0
Commits
39
Pipelines
2
Changes
43+
Merged
Dominik Hebeler
requested to merge
development
into
master
7 years ago
Overview
0
Commits
39
Pipelines
2
Changes
43
Expand
0
0
Merge request reports
Compare
master
version 1
7b6f41be
7 years ago
master (base)
and
latest version
latest version
8654a7d1
39 commits,
7 years ago
version 1
7b6f41be
37 commits,
7 years ago
43+ files
+
36878
−
2025
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
43+
Search (e.g. *.vue) (Ctrl+P)
app/Jobs/Searcher.php
+
4
−
1
Options
@@ -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