From 84d53c04b50ffbf8a94db0f1a9f966da347ed881 Mon Sep 17 00:00:00 2001 From: starsliao Date: Fri, 16 Dec 2022 14:08:24 +0800 Subject: [PATCH] fix bug --- flask-consul/views/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask-consul/views/jobs.py b/flask-consul/views/jobs.py index d08694f..350e70a 100644 --- a/flask-consul/views/jobs.py +++ b/flask-consul/views/jobs.py @@ -54,7 +54,7 @@ class Jobs(Resource): pass else: continue - region = i['args'][-1] if len(i['args']) == 2 else 'none' + region = i['args'][1] if len(i['args']) >= 2 else 'none' interval = i['minutes'] if f'ConsulManager/record/jobs/{i["id"]}' in job_count_dict: count = job_count_dict[f'ConsulManager/record/jobs/{i["id"]}']['count']