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
11147134
Commit
11147134
authored
6 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
Changed the Expire to use specified timeout in env file
parent
965ca5d5
No related branches found
Branches containing commit
No related tags found
2 merge requests
!1399
Development
,
!1386
Resolve "Optimize request times"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Http/Controllers/MetaGerSearch.php
+2
-2
2 additions, 2 deletions
app/Http/Controllers/MetaGerSearch.php
app/Models/Searchengine.php
+1
-1
1 addition, 1 deletion
app/Models/Searchengine.php
with
3 additions
and
3 deletions
app/Http/Controllers/MetaGerSearch.php
+
2
−
2
View file @
11147134
...
@@ -55,7 +55,7 @@ class MetaGerSearch extends Controller
...
@@ -55,7 +55,7 @@ class MetaGerSearch extends Controller
foreach
(
$metager
->
getResults
()
as
$result
)
{
foreach
(
$metager
->
getResults
()
as
$result
)
{
$pipeline
->
rpush
(
$metager
->
getRedisCurrentResultList
(),
base64_encode
(
serialize
(
$result
)));
$pipeline
->
rpush
(
$metager
->
getRedisCurrentResultList
(),
base64_encode
(
serialize
(
$result
)));
}
}
$pipeline
->
expire
(
$metager
->
getRedisCurrentResultList
(),
6000
);
$pipeline
->
expire
(
$metager
->
getRedisCurrentResultList
(),
env
(
'REDIS_RESULT_CACHE_DURATION'
)
);
$pipeline
->
execute
();
$pipeline
->
execute
();
# Die Ausgabe erstellen:
# Die Ausgabe erstellen:
...
@@ -154,7 +154,7 @@ class MetaGerSearch extends Controller
...
@@ -154,7 +154,7 @@ class MetaGerSearch extends Controller
$resultTmp
->
new
=
false
;
$resultTmp
->
new
=
false
;
$pipeline
->
rpush
(
$metager
->
getRedisCurrentResultList
(),
base64_encode
(
serialize
(
$resultTmp
)));
$pipeline
->
rpush
(
$metager
->
getRedisCurrentResultList
(),
base64_encode
(
serialize
(
$resultTmp
)));
}
}
$pipeline
->
expire
(
$metager
->
getRedisCurrentResultList
(),
6000
);
$pipeline
->
expire
(
$metager
->
getRedisCurrentResultList
(),
env
(
'REDIS_RESULT_CACHE_DURATION'
)
);
$pipeline
->
execute
();
$pipeline
->
execute
();
}
}
...
...
This diff is collapsed.
Click to expand it.
app/Models/Searchengine.php
+
1
−
1
View file @
11147134
...
@@ -109,7 +109,7 @@ abstract class Searchengine
...
@@ -109,7 +109,7 @@ abstract class Searchengine
$redis
=
Redis
::
connection
(
env
(
'REDIS_RESULT_CONNECTION'
));
$redis
=
Redis
::
connection
(
env
(
'REDIS_RESULT_CONNECTION'
));
// We will push the confirmation of the submission to the Result Hash
// We will push the confirmation of the submission to the Result Hash
$redis
->
hset
(
$metager
->
getRedisEngineResult
()
.
$this
->
name
,
"status"
,
"waiting"
);
$redis
->
hset
(
$metager
->
getRedisEngineResult
()
.
$this
->
name
,
"status"
,
"waiting"
);
$redis
->
expire
(
$metager
->
getRedisEngineResult
()
.
$this
->
name
,
60
);
$redis
->
expire
(
$metager
->
getRedisEngineResult
()
.
$this
->
name
,
env
(
'REDIS_RESULT_CACHE_DURATION'
)
);
// We need to submit a action that one of our workers can understand
// We need to submit a action that one of our workers can understand
// The missions are submitted to a redis queue in the following string format
// The missions are submitted to a redis queue in the following string format
...
...
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