Commit ce862cd5 authored by Guido Trotter's avatar Guido Trotter
Browse files

ganeti-masterd: Some docstrings work

- Add a docstring to IOServer's constructor
- Add argument description to PoolWorker's and JobRunner's ones

Reviewed-by: iustinp
parent dcf315e2
......@@ -66,6 +66,13 @@ class IOServer(SocketServer.UnixStreamServer):
QUEUE_PROCESSOR_SIZE = 1
def __init__(self, address, rqhandler):
"""IOServer constructor
Args:
address: the address to bind this IOServer to
rqhandler: RequestHandler type object
"""
SocketServer.UnixStreamServer.__init__(self, address, rqhandler)
self.do_quit = False
self.queue = jqueue.QueueManager()
......@@ -234,6 +241,10 @@ def JobRunner(proc, job):
This functions processes a single job in the context of given
processor instance.
Args:
proc: Ganeti Processor to run the job on
job: The job to run (unserialized format)
"""
job.SetStatus(opcodes.Job.STATUS_RUNNING)
fail = False
......@@ -257,6 +268,10 @@ def PoolWorker(worker_id, incoming_queue):
This is the actual processor of a single thread of Job execution.
Args:
worker_id: the unique id for this worker
incoming_queue: a queue to get jobs from
"""
while True:
print "worker %s sleeping" % worker_id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment