Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
284
Merge Requests
39
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
3ae24ff5
Commit
3ae24ff5
authored
29 minutes ago
by
Guy Thouret
Browse files
Options
Download
Deduplicate Boost data export in CassandraRepository -
#1201
parent
13a62c92
epic/boost-campaign
1 merge request
!417
WIP: Boost Campaigns
Pipeline
#102362013
failed with stages
in 45 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
27 deletions
+9
-27
Core/Boost/Network/Boost.php
View file @
3ae24ff5
...
...
@@ -54,7 +54,7 @@ use Minds\Traits\MagicAttributes;
* @method string getChecksum()
* @method Boost setChecksum(string $checksum)
* @method string getBoostType()
* @method Boost setBoostType()
* @method Boost setBoostType(
string $boostType
)
*/
class
Boost
{
...
...
@@ -201,6 +201,8 @@ class Boost
'checksum'
=>
$this
->
checksum
,
'state'
=>
$this
->
getState
(),
'transaction_id'
=>
$this
->
transactionId
,
'type'
=>
$this
->
type
,
'rejection_reason'
=>
$this
->
rejectedReason
,
'boost_type'
=>
$this
->
boostType
,
];
}
...
...
This diff is collapsed.
Core/Boost/Network/CassandraRepository.php
View file @
3ae24ff5
...
...
@@ -187,32 +187,12 @@ class CassandraRepository
(?, ?, ?, ?, ?)
"
;
$data
=
[
'guid'
=>
$boost
->
getGuid
(),
'schema'
=>
'04-2019'
,
'entity_guid'
=>
$boost
->
getEntityGuid
(),
'entity'
=>
$boost
->
getEntity
()
?
$boost
->
getEntity
()
->
export
()
:
null
,
//TODO: remove once on production
'bid'
=>
$boost
->
getBid
(),
'impressions'
=>
$boost
->
getImpressions
(),
'bidType'
=>
in_array
(
$boost
->
getBidType
(),
[
'onchain'
,
'offchain'
],
true
)
?
'tokens'
:
$boost
->
getBidType
(),
//TODO: remove once on production
'owner_guid'
=>
$boost
->
getOwnerGuid
(),
'owner'
=>
$boost
->
getOwner
()
?
$boost
->
getOwner
()
->
export
()
:
null
,
//TODO: remove once on production
'@created'
=>
$boost
->
getCreatedTimestamp
(),
'@reviewed'
=>
$boost
->
getReviewedTimestamp
(),
'@rejected'
=>
$boost
->
getRejectedTimestamp
(),
'@revoked'
=>
$boost
->
getRevokedTimestamp
(),
'@completed'
=>
$boost
->
getCompletedTimestamp
(),
'transactionId'
=>
$boost
->
getTransactionId
(),
'type'
=>
$boost
->
getType
(),
'handler'
=>
$boost
->
getType
(),
//TODO: remove once on production
'state'
=>
$boost
->
getState
(),
//TODO: remove once on production
'priority'
=>
$boost
->
getPriority
(),
'rating'
=>
$boost
->
getRating
(),
'tags'
=>
$boost
->
getTags
(),
'nsfw'
=>
$boost
->
getNsfw
(),
'rejection_reason'
=>
$boost
->
getRejectedReason
(),
'checksum'
=>
$boost
->
getChecksum
(),
];
$data
=
$boost
->
export
();
/* Additional parameters that differ from boost export */
$data
[
'schema'
]
=
'04-2019'
;
$data
[
'bidType'
]
=
in_array
(
$boost
->
getBidType
(),
[
'onchain'
,
'offchain'
],
true
)
?
'tokens'
:
$boost
->
getBidType
();
$data
[
'handler'
]
=
$boost
->
getType
();
$values
=
[
(
string
)
$boost
->
getType
(),
...
...
This diff is collapsed.
Please
register
or
sign in
to comment