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
Commits
0714b6c6
Commit
0714b6c6
authored
7 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Plain Diff
Merge branch '508-weitersuchen-funktioniert-nur-noch-fur-witch' into 'development'
Resolve "Weitersuchen funktioniert nur noch für Witch" Closes
#508
See merge request
!887
parents
fae76d18
986ca5dd
No related branches found
No related tags found
1 merge request
!1365
Resolve "Filter Options for MetaGer"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Jobs/Searcher.php
+2
-0
2 additions, 0 deletions
app/Jobs/Searcher.php
app/Models/Searchengine.php
+1
-1
1 addition, 1 deletion
app/Models/Searchengine.php
with
3 additions
and
1 deletion
app/Jobs/Searcher.php
+
2
−
0
View file @
0714b6c6
...
...
@@ -151,6 +151,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
);
}
...
...
This diff is collapsed.
Click to expand it.
app/Models/Searchengine.php
+
1
−
1
View file @
0714b6c6
...
...
@@ -236,6 +236,7 @@ abstract class Searchengine
$body
=
Cache
::
get
(
$this
->
hash
);
}
elseif
(
Redis
::
hexists
(
'search.'
.
$this
->
resultHash
,
$this
->
name
))
{
$body
=
Redis
::
hget
(
'search.'
.
$this
->
resultHash
,
$this
->
name
);
Redis
::
hdel
(
'search.'
.
$this
->
resultHash
,
$this
->
name
);
if
(
$this
->
canCache
&&
$this
->
cacheDuration
>
0
)
{
Cache
::
put
(
$this
->
hash
,
$body
,
$this
->
cacheDuration
);
}
...
...
@@ -244,7 +245,6 @@ abstract class Searchengine
$this
->
loadResults
(
$body
);
$this
->
getNext
(
$metager
,
$body
);
$this
->
loaded
=
true
;
Redis
::
hdel
(
'search.'
.
$this
->
hash
,
$this
->
name
);
return
true
;
}
else
{
return
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment