Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90711680
DiffusionBuildableEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 4, 02:12
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 6, 02:12 (2 d)
Engine
blob
Format
Raw Data
Handle
22123406
Attached To
rPH Phabricator
DiffusionBuildableEngine.php
View Options
<?php
final
class
DiffusionBuildableEngine
extends
HarbormasterBuildableEngine
{
public
function
publishBuildable
(
HarbormasterBuildable
$old
,
HarbormasterBuildable
$new
)
{
// Don't publish manual buildables.
if
(
$new
->
getIsManualBuildable
())
{
return
;
}
// Don't publish anything if the buildable status has not changed. At
// least for now, Diffusion handles buildable status exactly the same
// way that Harbormaster does.
$old_status
=
$old
->
getBuildableStatus
();
$new_status
=
$new
->
getBuildableStatus
();
if
(
$old_status
===
$new_status
)
{
return
;
}
// Don't publish anything if the buildable is still building.
if
(
$new
->
isBuilding
())
{
return
;
}
$xaction
=
$this
->
newTransaction
()
->
setMetadataValue
(
'harbormaster:buildablePHID'
,
$new
->
getPHID
())
->
setTransactionType
(
DiffusionCommitBuildableTransaction
::
TRANSACTIONTYPE
)
->
setNewValue
(
$new
->
getBuildableStatus
());
$this
->
applyTransactions
(
array
(
$xaction
));
}
}
Event Timeline
Log In to Comment