From 9ed87d5cfd06dcd33cb9573568b1817c9d1748d4 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 15 Jul 2018 08:40:49 +0200 Subject: [PATCH] [mod] global variables should be at the top --- run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index 08b80e9..bfbbfe5 100644 --- a/run.py +++ b/run.py @@ -30,6 +30,8 @@ COMMUNITY_APPS_LIST = "https://app.yunohost.org/community.json" APPS_LIST = [OFFICAL_APPS_LIST, COMMUNITY_APPS_LIST] +subscriptions = defaultdict(list) + def reset_pending_jobs(): Job.update(state="scheduled").where(Job.state == "running").execute() @@ -276,8 +278,6 @@ async def index(request): if __name__ == "__main__": - subscriptions = defaultdict(list) - reset_pending_jobs() reset_busy_workers()