예제 #1
0
 def __init__(self,
              zmq_transport=None,
              tornado_sockets=None,
              display=None,
              context=None,
              io_threads=None,
              db_num=0,
              group_id='',
              connection_info={}):
     SocketMultiprocess.__init__(self,
                                 zmq_transport,
                                 tornado_sockets=False,
                                 display=display,
                                 context=context,
                                 io_threads=io_threads,
                                 db_num=db_num,
                                 group_id=group_id,
                                 connection_info=connection_info)
     self._connect_db(db_num)
     self.time_server_tasks = TIME_SERVER_TASKS
     self.finish = False
     #dictionary with server codes as keys and  dictionary as values
     #with the code of the subtasks as keys and GarbageData as values.
     self.tasks = {}
     # set of server tasks that are finished and can be deleted
     self.server_delete = set()
예제 #2
0
파일: ventilator.py 프로젝트: pyople/pyople
 def __init__(self, zmq_transport=None, tornado_sockets=None,
              display=None, context=None, io_threads=None, db_num=0,
              group_id='', connection_info={}):
     SocketMultiprocess.__init__(self, zmq_transport, tornado_sockets,
                                 display, context, io_threads, db_num,
                                 group_id, connection_info)
     self._connect_db(db_num)
     self.tasks = {}
예제 #3
0
파일: server.py 프로젝트: pyople/pyople
 def __init__(self, zmq_transport=None, tornado_sockets=None,
              display=None, context=None, io_threads=None, db_num=0,
              group_id='', connection_info={}):
     SocketMultiprocess.__init__(self, zmq_transport,
                                 tornado_sockets=False, display=display,
                                 context=context, io_threads=io_threads,
                                 db_num=db_num, group_id=group_id,
                                 connection_info=connection_info)
     from tasks.models import MultiprocessTask
     MultiprocessTask.set_environment(self)
예제 #4
0
파일: worker.py 프로젝트: pyople/pyople
 def __init__(self, zmq_transport=None, tornado_sockets=None,
              display=None, context=None, io_threads=None, db_num=0,
              group_id='', connection_info={}, mongodb_name=''):
     SocketMultiprocess.__init__(self, zmq_transport, tornado_sockets,
                                 display, context, io_threads, db_num,
                                 group_id, connection_info)
     from pyople.tasks.models import MultiprocessTask
     self.mongodb_name = mongodb_name
     self.connect_mongodb(mongodb_name)
     MultiprocessTask.set_environment(self)
     self.result_class = Result
예제 #5
0
 def __init__(self,
              zmq_transport=None,
              tornado_sockets=None,
              display=None,
              context=None,
              io_threads=None,
              db_num=0,
              group_id='',
              connection_info={}):
     SocketMultiprocess.__init__(self, zmq_transport, tornado_sockets,
                                 display, context, io_threads, db_num,
                                 group_id, connection_info)
     self._connect_db(db_num)
     self.subscribed_tasks = []
예제 #6
0
 def __init__(self, zmq_transport=None, tornado_sockets=None,
              display=None, context=None, io_threads=None, db_num=0,
              group_id='', connection_info={}):
     SocketMultiprocess.__init__(self, zmq_transport,
                                 tornado_sockets=False, display=display,
                                 context=context, io_threads=io_threads,
                                 db_num=db_num, group_id=group_id,
                                 connection_info=connection_info)
     self._connect_db(db_num)
     self.time_server_tasks = TIME_SERVER_TASKS
     self.finish = False
     #dictionary with server codes as keys and  dictionary as values
     #with the code of the subtasks as keys and GarbageData as values.
     self.tasks = {}
     # set of server tasks that are finished and can be deleted
     self.server_delete = set()
예제 #7
0
파일: worker.py 프로젝트: pyople/pyople
 def __init__(self,
              zmq_transport=None,
              tornado_sockets=None,
              display=None,
              context=None,
              io_threads=None,
              db_num=0,
              group_id='',
              connection_info={},
              mongodb_name=''):
     SocketMultiprocess.__init__(self, zmq_transport, tornado_sockets,
                                 display, context, io_threads, db_num,
                                 group_id, connection_info)
     from pyople.tasks.models import MultiprocessTask
     self.mongodb_name = mongodb_name
     self.connect_mongodb(mongodb_name)
     MultiprocessTask.set_environment(self)
     self.result_class = Result
예제 #8
0
 def __init__(self,
              zmq_transport=None,
              tornado_sockets=None,
              display=None,
              context=None,
              io_threads=None,
              db_num=0,
              group_id='',
              connection_info={}):
     SocketMultiprocess.__init__(self,
                                 zmq_transport,
                                 tornado_sockets=False,
                                 display=display,
                                 context=context,
                                 io_threads=io_threads,
                                 db_num=db_num,
                                 group_id=group_id,
                                 connection_info=connection_info)
     from tasks.models import MultiprocessTask
     MultiprocessTask.set_environment(self)