def try_start_scheduler(self, app): t = None with self.scheduler_processes_lock: if not is_appdir(self.options.folder, app): self.schedmenu.delete("start %s" % app) return if app not in self.scheduler_processes: t = threading.Thread(target=self.start_schedulers, args=(app,)) if t is not None: t.start()
def get_code_for_scheduler(applications_parent, app_groups): app = app_groups[0] if not is_appdir(applications_parent, app): print("Application '%s' doesn't exist, skipping" % app) return None, None code = 'from gluon.globals import current;' if len(app_groups) > 1: code += "current._scheduler.group_names=['%s'];" % "','".join( app_groups[1:]) code += "current._scheduler.loop()" return app, code
def try_start_browser(self, app): url = self.url + app if not is_appdir(self.options.folder, app): self.pagesmenu.delete(url) return start_browser(url)