cubicweb/hooks/__init__.py
branch3.25
changeset 12145 752b94ed9748
parent 12112 0a54f49314f6
equal deleted inserted replaced
12144:f54286c1cef5 12145:752b94ed9748
    54         if not self.repo.has_scheduler():
    54         if not self.repo.has_scheduler():
    55             return
    55             return
    56         def update_feeds(repo):
    56         def update_feeds(repo):
    57             # take a list to avoid iterating on a dictionary whose size may
    57             # take a list to avoid iterating on a dictionary whose size may
    58             # change
    58             # change
    59             for uri, source in list(repo.sources_by_uri.items()):
    59             for uri, source in repo.sources_by_uri.items():
    60                 if (uri == 'system'
    60                 if (uri == 'system'
    61                     or not repo.config.source_enabled(source)
    61                     or not repo.config.source_enabled(source)
    62                     or not source.config['synchronize']):
    62                     or not source.config['synchronize']):
    63                     continue
    63                     continue
    64                 with repo.internal_cnx() as cnx:
    64                 with repo.internal_cnx() as cnx: