def _run_all(self):
        # Run global tasks
        cache_disabler = CacheDisabler()

        for task in _GLOBAL_PERIODIC_TASKS:
            now = self._now()
            if self._must_be_run(now, task):
                for version in task['versions']:
                    _debug("Running task %r for rlms %s %s..." % (task['name'], task['rlms'], version))
                    if task['disable_cache']:
                        cache_disabler.disable()
                    try:
                        task['func']()
                    except Exception:
                        traceback.print_exc()
                    finally:
                        cache_disabler.reenable()

                self.latest_executions[task['id']] = now

        # Same for regular
        for task in _LOCAL_PERIODIC_TASKS:
            now = self._now()
            if self._must_be_run(now, task):
                with app.app_context():
                    for version in task['versions']:
                        rlmss = db.session.query(dbRLMS).filter_by(kind = task['rlms'], version = version).all()
                        for db_rlms in rlmss:
                            ManagerClass = get_manager_class(db_rlms.kind, db_rlms.version, db_rlms.id)
                            rlms = ManagerClass(db_rlms.configuration)
                            _debug(u"Running task %r for rlms %s %s (%s)..." % (repr(task['name']), repr(task['rlms']), repr(version), repr(db_rlms.location)))
                            if task['disable_cache']:
                                cache_disabler.disable()

                            try:
                                task['func'](rlms)
                            except Exception:
                                traceback.print_exc()
                            finally:
                                cache_disabler.reenable()

                self.latest_executions[task['id']] = now
dataset/ETHPy150Open gateway4labs/labmanager/labmanager/rlms/__init__.py/TaskRunner._run_all/original