HCE Project DC service web UI
0.2
Hierarchical Cluster Engine DC service web UI
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
JobStatus.php
Go to the documentation of this file.
1
<?php
2
3
class
JobStatus
4
{
8
const
ENQUEUED
= 1;
//job is waiting for execution
9
const
RUNNING
= 2;
//job is currently executed
10
const
SUCCESS
= 3;
//job was successfull
11
const
ERROR
= 4;
//job had an internal error, but no exception
12
//const ABORTED = 5;
13
const
PAUSED
= 6;
//job is paused and not considered for execution
14
const
EXCEPTION
= 7;
//job threw an exception
15
16
public
static
$types
= array(
17
self::ENQUEUED => array(
'name'
=>
'Enqueued'
),
18
self::RUNNING => array(
'name'
=>
'Running'
),
19
self::SUCCESS => array(
'name'
=>
'Success'
),
20
self::ERROR => array(
'name'
=>
'Error'
),
21
self::PAUSED => array(
'name'
=>
'Paused'
),
22
self::EXCEPTION => array(
'name'
=>
'Exception'
),
23
);
24
32
public
static
function
getStatus
($statusId)
33
{
34
if
(array_key_exists($statusId, self::$types)) {
35
return
self::$types[$statusId];
36
}
37
}
38
46
public
static
function
getStatusName
($statusId)
47
{
48
$stat =
self::getStatus
($statusId);
49
if
($stat) {
50
return
$stat[
'name'
];
51
}
52
53
return
;
54
}
55
}
app
protected
modules
job
models
JobStatus.php
Generated on Tue Jun 30 2015 20:12:35 for HCE Project DC service web UI by
1.8.1.2