cubicweb/server/sources/datafeed.py
branch3.25
changeset 12148 79160d54662e
parent 12146 d540defa0591
child 12149 649100470733
equal deleted inserted replaced
12147:232eefd6d3b3 12148:79160d54662e
   105             _ = source_entity._cw._
   105             _ = source_entity._cw._
   106             msg = _('synchronization-interval must be greater than 1 minute')
   106             msg = _('synchronization-interval must be greater than 1 minute')
   107             raise ValidationError(source_entity.eid, {'config': msg})
   107             raise ValidationError(source_entity.eid, {'config': msg})
   108         return typed_config
   108         return typed_config
   109 
   109 
   110     def init(self, activated, source_entity):
   110     def init(self, source_entity):
   111         super(DataFeedSource, self).init(activated, source_entity)
   111         super(DataFeedSource, self).init(source_entity)
   112         self.parser_id = source_entity.parser
   112         self.parser_id = source_entity.parser
   113         self.latest_retrieval = source_entity.latest_retrieval
   113         self.latest_retrieval = source_entity.latest_retrieval
   114         typed_config = self.config
   114         typed_config = self.config
   115         self.synchro_interval = timedelta(seconds=typed_config['synchronization-interval'])
   115         self.synchro_interval = timedelta(seconds=typed_config['synchronization-interval'])
   116         self.max_lock_lifetime = timedelta(seconds=typed_config['max-lock-lifetime'])
   116         self.max_lock_lifetime = timedelta(seconds=typed_config['max-lock-lifetime'])