Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/build/HarbormasterBuild.php
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | private function getUnprocessedMessageState() { | ||||
$is_pausing = false; | $is_pausing = false; | ||||
$is_resuming = false; | $is_resuming = false; | ||||
$apply_messages = array(); | $apply_messages = array(); | ||||
foreach ($this->getUnprocessedMessages() as $message_object) { | foreach ($this->getUnprocessedMessages() as $message_object) { | ||||
$message_type = $message_object->getType(); | $message_type = $message_object->getType(); | ||||
switch ($message_type) { | switch ($message_type) { | ||||
case HarbormasterBuildCommand::COMMAND_RESTART: | case HarbormasterBuildMessageRestartTransaction::MESSAGETYPE: | ||||
$is_restarting = true; | $is_restarting = true; | ||||
$is_aborting = false; | $is_aborting = false; | ||||
$apply_messages = array($message_object); | $apply_messages = array($message_object); | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_ABORT: | case HarbormasterBuildMessageAbortTransaction::MESSAGETYPE: | ||||
$is_aborting = true; | $is_aborting = true; | ||||
$is_restarting = false; | $is_restarting = false; | ||||
$apply_messages = array($message_object); | $apply_messages = array($message_object); | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_PAUSE: | case HarbormasterBuildMessagePauseTransaction::MESSAGETYPE: | ||||
$is_pausing = true; | $is_pausing = true; | ||||
$is_resuming = false; | $is_resuming = false; | ||||
$apply_messages = array($message_object); | $apply_messages = array($message_object); | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_RESUME: | case HarbormasterBuildMessageResumeTransaction::MESSAGETYPE: | ||||
$is_resuming = true; | $is_resuming = true; | ||||
$is_pausing = false; | $is_pausing = false; | ||||
$apply_messages = array($message_object); | $apply_messages = array($message_object); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
$pending_status = null; | $pending_status = null; | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |