Пример #1
0
 def registerIn(self, registry):
     if self.__dict__.get("_id", False):
         return
     self.__dict__["_id"] = True
     if self.__dict__.get("_processing_ex", False):
         raise Exception("cycle detected")
     self.__dict__["_processing_ex"] = True
     registry.insert(self)
     for x in self.strategies:
         x.registerIn(registry)
     self.account.registerIn(registry)
     self.weight.registerIn(registry)
     self.normalizer.registerIn(registry)
     self.corrector.registerIn(registry)
     if hasattr(self, "_subscriptions"):
         for s in self._subscriptions:
             s.registerIn(registry)
     if hasattr(self, "_internals"):
         for t in self._internals:
             v = getattr(self, t)
             if type(v) in [list, set]:
                 for w in v:
                     w.registerIn(registry)
             else:
                 v.registerIn(registry)
     self.__dict__["_processing_ex"] = False
Пример #2
0
 def registerIn(self, registry):
     if self.__dict__.get('_id', False): return
     self.__dict__['_id'] = True
     if self.__dict__.get('_processing_ex', False):
         raise Exception('cycle detected')
     self.__dict__['_processing_ex'] = True
     registry.insert(self)
     
     if hasattr(self, '_subscriptions'):
         for s in self._subscriptions: s.registerIn(registry)
     self.__dict__['_processing_ex'] = False
Пример #3
0
 def registerIn(self, registry):
     if self.__dict__.get('_id', False): return
     self.__dict__['_id'] = True
     if self.__dict__.get('_processing_ex', False):
         raise Exception('cycle detected')
     self.__dict__['_processing_ex'] = True
     registry.insert(self)
     self.x.registerIn(registry)
     if hasattr(self, '_subscriptions'):
         for s in self._subscriptions: s.registerIn(registry)
     self.__dict__['_processing_ex'] = False
 def registerIn(self, registry):
     if self.__dict__.get("_id", False):
         return
     self.__dict__["_id"] = True
     if self.__dict__.get("_processing_ex", False):
         raise Exception("cycle detected")
     self.__dict__["_processing_ex"] = True
     registry.insert(self)
     self.proto.registerIn(registry)
     if hasattr(self, "_subscriptions"):
         for s in self._subscriptions:
             s.registerIn(registry)
     self.__dict__["_processing_ex"] = False
 def registerIn(self, registry):
     if self.__dict__.get('_id', False): return
     self.__dict__['_id'] = True
     if self.__dict__.get('_processing_ex', False):
         raise Exception('cycle detected')
     self.__dict__['_processing_ex'] = True
     registry.insert(self)
     self.trader.registerIn(registry)
     if hasattr(self, '_subscriptions'):
         for s in self._subscriptions: s.registerIn(registry)
     if hasattr(self, '_internals'):
         for t in self._internals:
             v = getattr(self, t)
             if type(v) in [list, set]:
                 for w in v: w.registerIn(registry)
             else:
                 v.registerIn(registry)
     self.__dict__['_processing_ex'] = False
Пример #6
0
 def registerIn(self, registry):
     if self.__dict__.get('_id', False): return
     self.__dict__['_id'] = True
     if self.__dict__.get('_processing_ex', False):
         raise Exception('cycle detected')
     self.__dict__['_processing_ex'] = True
     registry.insert(self)
     
     if hasattr(self, '_subscriptions'):
         for s in self._subscriptions: s.registerIn(registry)
     if hasattr(self, '_internals'):
         for t in self._internals:
             v = getattr(self, t)
             if type(v) in [list, set]:
                 for w in v: w.registerIn(registry)
             else:
                 v.registerIn(registry)
     self.__dict__['_processing_ex'] = False
Пример #7
0
 def registerIn(self, registry):
     if self.__dict__.get("_id", False):
         return
     self.__dict__["_id"] = True
     if self.__dict__.get("_processing_ex", False):
         raise Exception("cycle detected")
     self.__dict__["_processing_ex"] = True
     registry.insert(self)
     self.queue.registerIn(registry)
     if hasattr(self, "_subscriptions"):
         for s in self._subscriptions:
             s.registerIn(registry)
     if hasattr(self, "_internals"):
         for t in self._internals:
             v = getattr(self, t)
             if type(v) in [list, set]:
                 for w in v:
                     w.registerIn(registry)
             else:
                 v.registerIn(registry)
     self.__dict__["_processing_ex"] = False
Пример #8
0
 def registerIn(self, registry):
     registry.insert(self)
Пример #9
0
 def registerIn(self, registry):
     registry.insert(self)