2018-07-13 14:51:00 +02:00
|
|
|
#!/usr/bin/env python3
|
2018-03-29 22:37:28 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2018-04-05 14:36:01 +02:00
|
|
|
from bgpranking.libs.helpers import is_running, get_socket_path
|
2018-03-29 22:37:28 +02:00
|
|
|
import time
|
|
|
|
from redis import StrictRedis
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2018-04-05 14:36:01 +02:00
|
|
|
r = StrictRedis(unix_socket_path=get_socket_path('prefixes'), db=1, decode_responses=True)
|
2018-03-29 22:37:28 +02:00
|
|
|
r.set('shutdown', 1)
|
|
|
|
while True:
|
|
|
|
running = is_running()
|
|
|
|
print(running)
|
|
|
|
if not running:
|
|
|
|
break
|
|
|
|
time.sleep(10)
|