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
165
Issues
165
List
Boards
Labels
Service Desk
Milestones
Merge Requests
49
Merge Requests
49
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
Commits
99168bdd
Commit
99168bdd
authored
49 minutes ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(chore): Lifecycle tweaks
parent
d587d4cf
goal/boost-campaigns-e24
1 merge request
!235
WIP: Boost Campaigns (&24)
Pipeline
#69075370
failed with stages
in 3 minutes and 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
BudgetDelegate.php
Core/Boost/Campaigns/Delegates/BudgetDelegate.php
+1
-1
Manager.php
Core/Boost/Campaigns/Manager.php
+6
-4
No files found.
Core/Boost/Campaigns/Delegates/BudgetDelegate.php
View file @
99168bdd
...
...
@@ -82,7 +82,7 @@ class BudgetDelegate
*/
public
function
onStateChange
(
Campaign
$campaign
)
{
// TODO: Check that campaign is in a final incomplete status (revoked/rejected)
// TODO: Check that campaign is in a final
complete or
incomplete status (revoked/rejected)
// TODO: Refund!
// TODO: Store refund info onto Campaign/Boost metadata
...
...
This diff is collapsed.
Click to expand it.
Core/Boost/Campaigns/Manager.php
View file @
99168bdd
...
...
@@ -150,6 +150,7 @@ class Manager
// Validate checksum
// TODO: Check checksum!
if
(
!
$campaign
->
getChecksum
())
{
throw
new
CampaignException
(
'Invalid checksum value'
);
}
...
...
@@ -259,11 +260,8 @@ class Manager
// Update
$now
=
time
()
*
1000
;
$campaign
->
setStart
(
$now
)
// Update start date so we can calculate distribution correctly
->
setReviewedTimestamp
(
$now
);
->
setReviewedTimestamp
(
time
()
*
1000
);
// Write
...
...
@@ -399,6 +397,10 @@ class Manager
$this
->
repository
->
update
(
$campaign
);
$this
->
elasticRepository
->
update
(
$campaign
);
// Budget update
$this
->
budgetDelegate
->
onStateChange
(
$campaign
);
return
$campaign
;
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment