gevent ain't working so it's cut

This commit is contained in:
Rudi Grinberg 2012-10-22 12:52:47 -04:00
parent 75ba2d8e90
commit 32ce685e0e
2 changed files with 12 additions and 3 deletions

View File

@ -250,6 +250,10 @@ class Manager(Loggable):
notifier = pyinotify.Notifier(self.wm)
notifier.coalesce_events()
notifier.loop()
#notifier = pyinotify.ThreadedNotifier(self.wm, read_freq=1)
#notifier.coalesce_events()
#notifier.start()
#return notifier
#import asyncore
#notifier = pyinotify.AsyncNotifier(self.wm)
#asyncore.loop()

View File

@ -23,9 +23,9 @@ from std_err_override import LogWriter
import media.monitor.pure as mmp
from api_clients import api_client as apc
import gevent.monkey
#import gevent.monkey
gevent.monkey.patch_all(select=False)
#gevent.monkey.patch_all(select=False)
def main(global_config, api_client_config, log_config,
@ -133,7 +133,7 @@ def main(global_config, api_client_config, log_config,
apiclient.register_component('media-monitor')
manager.loop()
return manager.loop()
__doc__ = """
Usage:
@ -146,6 +146,9 @@ Options:
--log=<path> log config at <path>
"""
def main_loop():
while True: pass
if __name__ == '__main__':
from docopt import docopt
args = docopt(__doc__,version="mm1.99")
@ -155,3 +158,5 @@ if __name__ == '__main__':
sys.exit(0)
print("Running mm1.99")
main(args['--config'],args['--apiclient'],args['--log'])
#gevent.joinall([ gevent.spawn(main_loop) ])