1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
A job that the NE1 Job Manager schedules and monitors.
"""
class NE1_Job:
"""
A job that the NE1 Job Manager schedules and monitors. Subclasses know how
to run themselves and can be polled.
This is an abstract/interface class and should not be instantiated.
The subclasses know how to run themselves and can be polled, etc.
The NH1_Job, when run, would communicate with the NH1 instance to launch
itself. The NE1 Job Manager could poll the NH1_Job for status. The NH1_Job
could provide call-backs to indicate simulation completion, failures, etc.
"""
def getPriority(self):
"""
Returns the priority of this job.
@return: (0=low, 1=normal, 2=high)
"""
pass
def setPriority(self, priority):
"""
Sets the priority for this job.
@param priority: 0=low, 1=normal, 2=high
"""
pass
def run(self):
"""
Starts this job.
"""
pass
def pause(self, location):
"""
Pauses this job in-, or out-of-, memory.
@param location: 0=in-memory, 1=out-of-memory
"""
pass
def resume(self):
"""
Resumes this job from the paused state.
"""
pass
def abort(self):
"""
Abort this job.
"""
pass
def getStatus(self):
"""
Returns the status of this job.
@return: (0=idle, 1=running, 2=paused, 3=aborted, 4=failure),
(% complete), (text message)
"""
pass
def getAlertEmailAddress(self):
"""
Returns the email address to notify when this job completes or fails.
"""
pass
def setAlertEmailAddress(self, emailAddress):
"""
Sets the email address to notify when this job completes or fails.
"""
pass
def getPopUpNE1_Alert(self):
"""
Returns 1 if NE1 should pop up an alert when this job completes or
fails, and 0 otherwise.
"""
pass
def setPopUpNE1_Alert(self, popUp):
"""
Sets whether NE1 should pop up an alert when this job completes or
fails.
@param popUp: (1=do pop up an alert, 0=don't pop up an alert)
"""
pass
def getSchedule(self):
"""
Returns the time this job is scheduled to run.
@return: (0=later, 1=now),
(the later
U{datetime<http://docs.python.org/lib/datetime-datetime.html>}
object)
"""
pass
def setSchedule(self, nowOrLater, laterDatetime):
"""
Sets the time to run the job.
@param nowOrLater: 0=later, 1=now
@param laterDatetime: the later
U{datetime<http://docs.python.org/lib/datetime-datetime.html>}
object
"""
pass
|