forked from HumanArk/hafarm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
manager.py
79 lines (55 loc) · 1.57 KB
/
manager.py
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
import abc
__plugin__version__ = 0
class RenderManager(object):
__metaclass__ = abc.ABCMeta
def __init__(self):
pass
@abc.abstractproperty
def register_manager(self):
return True
@abc.abstractproperty
def version(self):
return __plugin__version__
@abc.abstractmethod
def test_connection(self):
'''Test renderfarm backend condidtion.'''
return
@abc.abstractmethod
def render(self, params):
'''Sends job to farm. '''
return
@abc.abstractmethod
def get_queue_list(self):
'''Get possible queues / pools from render manager.'''
return
@abc.abstractmethod
def get_group_list(self):
'''Get posible host froup (subsets of queues) from render manager.'''
return
@abc.abstractmethod
def get_host_list(self):
'''Get the list of all hosts in render farm. '''
return
@abc.abstractmethod
def get_job_stats(self, job_id):
'''Get detailed statistics of finshed jobs.'''
return {}
class DummyManager(RenderManager):
@property
def register_manager(self):
return True
@property
def version(self):
return __plugin__version__
def test_connection(self):
return True
def render(self, parms):
return {'DummyManager': 'I do not render, I am a placeholder.'}
def get_queue_list(self):
return []
def get_host_list(self):
return []
def get_group_list(self):
return []
def get_job_stats(self, job_id):
return {}