2018-07-13 14:51:00 +02:00
|
|
|
#!/usr/bin/env python3
|
2018-03-29 22:37:28 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import time
|
|
|
|
|
2021-12-06 14:30:08 +01:00
|
|
|
from bgpranking.default import AbstractManager
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
AbstractManager.force_shutdown()
|
|
|
|
time.sleep(5)
|
2018-03-29 22:37:28 +02:00
|
|
|
while True:
|
2021-12-06 14:30:08 +01:00
|
|
|
try:
|
|
|
|
running = AbstractManager.is_running()
|
|
|
|
except FileNotFoundError:
|
|
|
|
print('Redis is already down.')
|
|
|
|
break
|
2018-03-29 22:37:28 +02:00
|
|
|
if not running:
|
|
|
|
break
|
2021-12-06 14:30:08 +01:00
|
|
|
print(running)
|
|
|
|
time.sleep(5)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|