Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
204
Issues
204
List
Boards
Labels
Service Desk
Milestones
Merge Requests
29
Merge Requests
29
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Compare Revisions
08d1d75d7f6ffdfa605611c0f60a5ef655513c16...ac58cb964cdaaf159f7e2e91e3e6e3437a5cfcdd
Source
ac58cb964cdaaf159f7e2e91e3e6e3437a5cfcdd
Select Git revision
...
Target
08d1d75d7f6ffdfa605611c0f60a5ef655513c16
Select Git revision
Compare
Commits (2)
updated to only apply to active boosts and requests
· d735c585
Ben Hayward
authored
2 hours ago
d735c585
Fixing and updating tests
· ac58cb96
Ben Hayward
authored
1 hour ago
ac58cb96
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
ElasticRepository.php
Core/Boost/Network/ElasticRepository.php
+1
-1
Manager.php
Core/Boost/Network/Manager.php
+3
-2
ManagerSpec.php
Spec/Core/Boost/Network/ManagerSpec.php
+2
-2
No files found.
Core/Boost/Network/ElasticRepository.php
View file @
ac58cb96
...
...
@@ -108,7 +108,7 @@ class ElasticRepository
$sort
=
[
'@timestamp'
=>
'asc'
];
}
if
(
$opts
[
'state'
]
===
'approved'
||
$opts
[
'state'
]
===
'review'
)
{
if
(
$opts
[
'state'
]
===
'approved'
||
$opts
[
'state'
]
===
'review'
||
$opts
[
'state'
]
===
'active'
)
{
$must_not
[]
=
[
'exists'
=>
[
'field'
=>
'@completed'
,
...
...
This diff is collapsed.
Click to expand it.
Core/Boost/Network/Manager.php
View file @
ac58cb96
...
...
@@ -57,14 +57,14 @@ class Manager
'state'
=>
null
,
],
$opts
);
if
(
$opts
[
'state'
]
==
'review'
)
{
if
(
$opts
[
'state'
]
==
'review'
||
$opts
[
'state'
]
==
'active'
)
{
$opts
[
'useElastic'
]
=
true
;
}
if
(
$opts
[
'useElastic'
])
{
$response
=
$this
->
elasticRepository
->
getList
(
$opts
);
if
(
$opts
[
'state'
]
===
'review'
)
{
if
(
$opts
[
'state'
]
===
'review'
||
$opts
[
'state'
]
===
'active'
)
{
$opts
[
'guids'
]
=
array_map
(
function
(
$boost
)
{
return
$boost
->
getGuid
();
},
$response
->
toArray
());
...
...
@@ -200,6 +200,7 @@ class Manager
public
function
getOffchainBoosts
(
$boost
,
$limit
=
10
)
{
$existingBoosts
=
$this
->
getList
([
'useElastic'
=>
true
,
'state'
=>
'active'
,
'type'
=>
$boost
->
getType
(),
'limit'
=>
$limit
,
'order'
=>
'desc'
,
...
...
This diff is collapsed.
Click to expand it.
Spec/Core/Boost/Network/ManagerSpec.php
View file @
ac58cb96
...
...
@@ -303,7 +303,7 @@ class ManagerSpec extends ObjectBehavior
$this
->
elasticRepository
->
getList
([
"hydrate"
=>
true
,
"useElastic"
=>
true
,
"state"
=>
"
review
"
,
"state"
=>
"
active
"
,
"type"
=>
"newsfeed"
,
"limit"
=>
10
,
"order"
=>
"desc"
,
...
...
@@ -375,7 +375,7 @@ class ManagerSpec extends ObjectBehavior
$this
->
elasticRepository
->
getList
([
"hydrate"
=>
true
,
"useElastic"
=>
true
,
"state"
=>
"
review
"
,
"state"
=>
"
active
"
,
"type"
=>
"newsfeed"
,
"limit"
=>
10
,
"order"
=>
"desc"
,
...
...
This diff is collapsed.
Click to expand it.