Exemple #1
0
 def __engine__(self, *args, **kwargs):
     if self.is_enabled():
         ca.threads_init()
         with self.beamline.lock:
             self.set_state(busy=True, message=self.description)
             self.output = self.run()
             logger.info('Script `{}` terminated successfully'.format(
                 self.name))
             self.set_state(done=self.output, busy=False, message='Done.')
             self.on_complete(*args, **kwargs)
     else:
         logger.warning('Script "{}" disabled or busy.'.format(self, ))
Exemple #2
0
 def count(device, exposure, i):
     ca.threads_init()
     counts[i] = device.count(exposure)
Exemple #3
0
 def __engine__(self):
     """
     Proxy for calling run method inside a thread
     """
     ca.threads_init()
     self.run()
Exemple #4
0
 def _f(*args, **kwargs):
     threads_init()
     return f(*args, **kwargs)
Exemple #5
0
 def new_f(*args, **kwargs):
     threads_init()  # enable epics environment to be active within thread
     return f(*args, **kwargs)