def run(): """ CLI entry point. Parses args and starts the gevent-socketio server. """ settings.parse_args() pid_file = settings.PID_FILE or os.path.join(gettempdir(), "gnotty-%s-%s.pid" % (settings.HTTP_HOST, settings.HTTP_PORT)) if settings.KILL: if kill(pid_file): print "Daemon killed" else: print "Could not kill any daemons" return elif kill(pid_file): print "Running daemon killed" if settings.DAEMON: daemonize(pid_file) serve_forever()
def run(): """ CLI entry point. Parses args and starts the gevent-socketio server. """ settings.parse_args() pid_name = "gnotty-%s-%s.pid" % (settings.HTTP_HOST, settings.HTTP_PORT) pid_file = settings.PID_FILE or os.path.join(gettempdir(), pid_name) if settings.KILL: if kill(pid_file): print "Daemon killed" else: print "Could not kill any daemons" return elif kill(pid_file): print "Running daemon killed" if settings.DAEMON: daemonize(pid_file) serve_forever()
def handle(self, *args, **options): getLogger("irc.message").addHandler(ModelLogger()) settings.parse_args() from gnotty.server import serve_forever serve_forever(django=True)