Make queue and name arguments not optional; they're always passed in anyway.

This commit is contained in:
Tommi Virtanen 2011-07-20 09:53:26 -07:00
parent 71cfd4956c
commit ad444b33ee

View file

@ -48,7 +48,7 @@ class Result:
details=self.details, details=self.details,
) )
def reader(bucket, name=None, queue=None): def reader(bucket, name, queue):
while (1): while (1):
count = 0 count = 0
for key in bucket.list(): for key in bucket.list():
@ -57,7 +57,6 @@ def reader(bucket, name=None, queue=None):
key.get_contents_to_file(fp) key.get_contents_to_file(fp)
end = time.time() end = time.time()
elapsed = end - start elapsed = end - start
if queue:
queue.put( queue.put(
Result( Result(
name, name,
@ -71,7 +70,7 @@ def reader(bucket, name=None, queue=None):
if count == 0: if count == 0:
gevent.sleep(1) gevent.sleep(1)
def writer(bucket, name=None, queue=None, quantity=1, file_size=1, file_stddev=0, file_name_seed=None): def writer(bucket, name, queue, quantity=1, file_size=1, file_stddev=0, file_name_seed=None):
while (1): while (1):
r = random.randint(0, 65535) r = random.randint(0, 65535)
r2 = r r2 = r
@ -90,7 +89,6 @@ def writer(bucket, name=None, queue=None, quantity=1, file_size=1, file_stddev=0
end = time.time() end = time.time()
elapsed = end - start elapsed = end - start
if queue:
queue.put(Result(name, queue.put(Result(name,
type=Result.TYPE_WRITER, type=Result.TYPE_WRITER,
time=elapsed, time=elapsed,