mirror of
https://github.com/lilydjwg/archrepo2.git
synced 2025-03-10 12:02:43 +00:00
29 lines
538 B
Python
Executable file
29 lines
538 B
Python
Executable file
#!/usr/bin/env python3
|
|
# vim:fileencoding=utf-8
|
|
|
|
import sys
|
|
import configparser
|
|
import logging
|
|
|
|
from tornado.ioloop import IOLoop
|
|
|
|
from myutils import enable_pretty_logging
|
|
enable_pretty_logging(logging.DEBUG)
|
|
|
|
from repomon import repomon
|
|
|
|
def main(conffile):
|
|
config = configparser.ConfigParser()
|
|
config.read(conffile)
|
|
|
|
notifier = repomon(config['repository'])
|
|
|
|
ioloop = IOLoop.instance()
|
|
try:
|
|
ioloop.start()
|
|
except KeyboardInterrupt:
|
|
ioloop.close()
|
|
notifier.stop()
|
|
|
|
if __name__ == '__main__':
|
|
main(sys.argv[1])
|