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
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
141
Issues
141
List
Boards
Labels
Service Desk
Milestones
Merge Requests
28
Merge Requests
28
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Packages
Packages
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
e40d62d3ca7bdcd9e04deb5b2cd46c19fe011f58...5b0ef158e84aa52779f737baeca0d301047d5d9b
Source
5b0ef158e84aa52779f737baeca0d301047d5d9b
Select Git revision
...
Target
e40d62d3ca7bdcd9e04deb5b2cd46c19fe011f58
Select Git revision
Compare
Commits (2)
(chore): Appeals loop and awaiting TTL (
#463
)
· 23f0c499
Emiliano Balbuena
authored
2 hours ago
23f0c499
Merge branch 'hotfix/appeal-summons-tweaks-1' into 'master'
· 5b0ef158
Mark Harding
authored
2 hours ago
(chore): Appeals loop and awaiting TTL (
#463
) See merge request
!180
5b0ef158
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
ReportsAppealSummon.php
Core/Queue/Runners/ReportsAppealSummon.php
+2
-2
Manager.php
Core/Reports/Summons/Manager.php
+9
-3
No files found.
Core/Queue/Runners/ReportsAppealSummon.php
View file @
5b0ef158
...
...
@@ -51,8 +51,8 @@ class ReportsAppealSummon implements QueueRunner
'include_only'
=>
$cohort
?:
null
,
]);
if
(
$missing
>
0
)
{
echo
"
Missing
{
$missing
}
juror(s). Deferring
..."
.
PHP_EOL
;
if
(
$missing
>
0
||
$appeal
->
getReport
()
->
getState
()
===
'appealed'
)
{
echo
"
There are
{
$missing
}
juror(s). Deferring until case is out of `appealed` state
..."
.
PHP_EOL
;
$manager
->
defer
(
$appeal
);
}
...
...
This diff is collapsed.
Click to expand it.
Core/Reports/Summons/Manager.php
View file @
5b0ef158
...
...
@@ -70,7 +70,7 @@ class Manager
'include_only'
=>
null
,
'active_threshold'
=>
5
*
60
,
'jury_size'
=>
12
,
'awaiting_ttl'
=>
12
0
,
'awaiting_ttl'
=>
30
0
,
],
$opts
);
// Get a fresh report to collect completed jurors
...
...
@@ -99,7 +99,7 @@ class Manager
// Check how many are missing
$missing
=
$opts
[
'jury_size'
]
-
count
(
array_filter
(
$summonses
,
function
(
Summons
$summons
)
{
return
$summons
->
isAccepted
()
||
$summons
->
isAwaiting
()
;
return
$summons
->
isAccepted
();
}));
// If we have a full jury, don't summon
...
...
@@ -108,6 +108,12 @@ class Manager
return
0
;
}
// Check how many accepted or are awaiting, it's needed to know the approximate pool size
$poolSize
=
$opts
[
'jury_size'
]
-
count
(
array_filter
(
$summonses
,
function
(
Summons
$summons
)
{
return
$summons
->
isAccepted
()
||
$summons
->
isAwaiting
();
}));
// Create an array of channel GUIDs that are involved in this case
$alreadyInvolvedGuids
=
array_map
(
function
(
Summons
$summons
)
{
...
...
@@ -127,7 +133,7 @@ class Manager
// Pick up to missing size
$cohort
=
$this
->
cohort
->
pick
([
'size'
=>
$
missing
,
'size'
=>
$
poolSize
,
'for'
=>
$appeal
->
getOwnerGuid
(),
'except'
=>
$alreadyInvolvedGuids
,
'except_hashes'
=>
$alreadyInvolvedPhoneHashes
,
...
...
This diff is collapsed.
Click to expand it.