From 9624ebb66f4ec94c0afba3133aeea9383ddddaa8 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Mon, 24 Jul 2017 16:37:30 +0300 Subject: [PATCH] Ping all urls in endpoints --- mmwatch/process.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mmwatch/process.py b/mmwatch/process.py index ac129af..80333fd 100755 --- a/mmwatch/process.py +++ b/mmwatch/process.py @@ -25,4 +25,9 @@ if st.run_hourly(): import config if config.ENDPOINT: import urllib2 - urllib2.urlopen('{0}/filters'.format(config.ENDPOINT)) + if isinstance(config.ENDPOINT, (list, tuple)): + urls = config.ENDPOINT + else: + urls = [config.ENDPOINT] + for url in urls: + urllib2.urlopen('{0}/filters'.format(url))