Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/build/HarbormasterBuild.php
| Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | return $this->getBuildStatus() === self::STATUS_PENDING || | ||||
| $this->getBuildStatus() === self::STATUS_BUILDING; | $this->getBuildStatus() === self::STATUS_BUILDING; | ||||
| } | } | ||||
| public function createLog( | public function createLog( | ||||
| HarbormasterBuildTarget $build_target, | HarbormasterBuildTarget $build_target, | ||||
| $log_source, | $log_source, | ||||
| $log_type) { | $log_type) { | ||||
| $log_source = phutil_utf8_shorten($log_source, 250); | $log_source = id(new PhutilUTF8StringTruncator()) | ||||
| ->setMaximumCodepoints(250) | |||||
| ->truncateString($log_source); | |||||
| $log = HarbormasterBuildLog::initializeNewBuildLog($build_target) | $log = HarbormasterBuildLog::initializeNewBuildLog($build_target) | ||||
| ->setLogSource($log_source) | ->setLogSource($log_source) | ||||
| ->setLogType($log_type) | ->setLogType($log_type) | ||||
| ->save(); | ->save(); | ||||
| return $log; | return $log; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines | |||||