smbinterp/bin/server.py

22 lines
648 B
Python
Raw Normal View History

2011-03-02 22:26:04 -08:00
#!/usr/bin/env python
2011-05-24 17:42:27 -07:00
from interp.cluster import QueueManager
from optparse import OptionParser
2011-03-02 22:26:04 -08:00
2011-05-24 17:42:27 -07:00
if __name__ == '__main__':
parser = OptionParser(usage = "usage: %s [options] <server> <interp count>")
parser.add_option('-p', '--port',
type="int", dest="port", default=6666,
help="specify the port to use on the server (default: %default)")
parser.add_option('-a', '--auth-key',
type="str", dest="authkey", default='asdf',
help="authkey (default: %default)")
(options, args) = parser.parse_args()
m = QueueManager(address=('', options.port), authkey=options.authkey)
s = m.get_server()
s.serve_forever()