server/sources/datafeed.py
changeset 7910 e5d5609e3bf1
parent 7731 48e78934a4e2
child 7931 60068dc83457
equal deleted inserted replaced
7907:08320697ca1a 7910:e5d5609e3bf1
    80 
    80 
    81     def _entity_update(self, source_entity):
    81     def _entity_update(self, source_entity):
    82         source_entity.complete()
    82         source_entity.complete()
    83         self.parser_id = source_entity.parser
    83         self.parser_id = source_entity.parser
    84         self.latest_retrieval = source_entity.latest_retrieval
    84         self.latest_retrieval = source_entity.latest_retrieval
    85         self.urls = [url.strip() for url in source_entity.url.splitlines()
    85         if source_entity.url:
    86                      if url.strip()]
    86             self.urls = [url.strip() for url in source_entity.url.splitlines()
    87 
    87                          if url.strip()]
       
    88         else:
       
    89             self.urls = []
    88     def update_config(self, source_entity, typedconfig):
    90     def update_config(self, source_entity, typedconfig):
    89         """update configuration from source entity. `typedconfig` is config
    91         """update configuration from source entity. `typedconfig` is config
    90         properly typed with defaults set
    92         properly typed with defaults set
    91         """
    93         """
    92         self.synchro_interval = timedelta(seconds=typedconfig['synchronization-interval'])
    94         self.synchro_interval = timedelta(seconds=typedconfig['synchronization-interval'])