Changeset View
Changeset View
Standalone View
Standalone View
src/applications/daemon/storage/PhabricatorDaemonLog.php
<?php | <?php | ||||
final class PhabricatorDaemonLog extends PhabricatorDaemonDAO | final class PhabricatorDaemonLog extends PhabricatorDaemonDAO | ||||
implements PhabricatorPolicyInterface { | implements PhabricatorPolicyInterface { | ||||
const STATUS_UNKNOWN = 'unknown'; | const STATUS_UNKNOWN = 'unknown'; | ||||
const STATUS_RUNNING = 'run'; | const STATUS_RUNNING = 'run'; | ||||
const STATUS_DEAD = 'dead'; | const STATUS_DEAD = 'dead'; | ||||
const STATUS_WAIT = 'wait'; | const STATUS_WAIT = 'wait'; | ||||
const STATUS_EXITING = 'exiting'; | const STATUS_EXITING = 'exiting'; | ||||
const STATUS_EXITED = 'exit'; | const STATUS_EXITED = 'exit'; | ||||
protected $daemon; | protected $daemon; | ||||
protected $host; | protected $host; | ||||
protected $pid; | protected $pid; | ||||
protected $runningAsUser; | |||||
protected $argv; | protected $argv; | ||||
protected $explicitArgv = array(); | protected $explicitArgv = array(); | ||||
protected $envHash; | protected $envHash; | ||||
protected $status; | protected $status; | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'argv' => self::SERIALIZATION_JSON, | 'argv' => self::SERIALIZATION_JSON, | ||||
'explicitArgv' => self::SERIALIZATION_JSON, | 'explicitArgv' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'daemon' => 'text255', | 'daemon' => 'text255', | ||||
'host' => 'text255', | 'host' => 'text255', | ||||
'pid' => 'uint32', | 'pid' => 'uint32', | ||||
'runningAsUser' => 'text255?', | |||||
epriestley: One tiny issue I caught in the pull -- since this is nullable (which seems reasonable, as… | |||||
'envHash' => 'bytes40', | 'envHash' => 'bytes40', | ||||
'status' => 'text8', | 'status' => 'text8', | ||||
), | ), | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'status' => array( | 'status' => array( | ||||
'columns' => array('status'), | 'columns' => array('status'), | ||||
), | ), | ||||
'dateCreated' => array( | 'dateCreated' => array( | ||||
Show All 40 Lines |
One tiny issue I caught in the pull -- since this is nullable (which seems reasonable, as existing rows have no meaningful value), the spec should be text255? rather than text255. bin/storage adjust will warn you about this, or it should be shown in Config -> Database Issues in the web UI.
(We'll get all this magic documented better at some point, it landed relatively-recently and wasn't very stable for a while.)