cubicweb/server/sources/datafeed.py
branch3.25
changeset 12143 a446124bcf3c
parent 11775 39cf9e55ada8
child 12144 f54286c1cef5
--- a/cubicweb/server/sources/datafeed.py	Tue Apr 04 16:28:50 2017 +0200
+++ b/cubicweb/server/sources/datafeed.py	Wed Apr 05 14:02:58 2017 +0200
@@ -112,11 +112,10 @@
         self.parser_id = source_entity.parser
         self.latest_retrieval = source_entity.latest_retrieval
 
-    def update_config(self, source_entity, typed_config):
-        """update configuration from source entity. `typed_config` is config
-        properly typed with defaults set
-        """
-        super(DataFeedSource, self).update_config(source_entity, typed_config)
+    def init(self, activated, source_entity):
+        super(DataFeedSource, self).init(activated, source_entity)
+        self.parser_id = source_entity.parser
+        typed_config = self.config
         self.synchro_interval = timedelta(seconds=typed_config['synchronization-interval'])
         self.max_lock_lifetime = timedelta(seconds=typed_config['max-lock-lifetime'])
         self.http_timeout = typed_config['http-timeout']
@@ -127,10 +126,6 @@
             self.use_cwuri_as_url = typed_config['use-cwuri-as-url']
             self.public_config['use-cwuri-as-url'] = self.use_cwuri_as_url
 
-    def init(self, activated, source_entity):
-        super(DataFeedSource, self).init(activated, source_entity)
-        self.parser_id = source_entity.parser
-
     def _get_parser(self, cnx, **kwargs):
         if self.parser_id is None:
             self.warning('No parser defined on source %r', self)