[Checkins] SVN: Sandbox/gotcha/five.taskqueue/src/five/taskqueue/ remove useless if else; cleanup tests accordingly
Godefroid Chapelle
gotcha at bubblenet.be
Wed Apr 14 04:50:43 EDT 2010
Log message for revision 110834:
remove useless if else; cleanup tests accordingly
Changed:
U Sandbox/gotcha/five.taskqueue/src/five/taskqueue/processor.py
U Sandbox/gotcha/five.taskqueue/src/five/taskqueue/tests/processor.txt
-=-
Modified: Sandbox/gotcha/five.taskqueue/src/five/taskqueue/processor.py
===================================================================
--- Sandbox/gotcha/five.taskqueue/src/five/taskqueue/processor.py 2010-04-14 08:38:22 UTC (rev 110833)
+++ Sandbox/gotcha/five.taskqueue/src/five/taskqueue/processor.py 2010-04-14 08:50:42 UTC (rev 110834)
@@ -1,5 +1,4 @@
import logging
-import time
from ZPublisher.HTTPRequest import HTTPRequest
from ZPublisher.HTTPResponse import HTTPResponse
@@ -27,7 +26,6 @@
env = {'SERVER_NAME': 'dummy',
'SERVER_PORT': '8080',
'PATH_INFO': '/' + '/'.join(path)}
- log.info('Call "%s"' % env['PATH_INFO'])
request = HTTPRequest(None, env, response)
conn = self.db.open()
root = conn.root()
@@ -43,7 +41,4 @@
finally:
request.close()
conn.close()
- if not request.response.body:
- time.sleep(1)
- else:
- return request.response.body
+ return request.response.body
Modified: Sandbox/gotcha/five.taskqueue/src/five/taskqueue/tests/processor.txt
===================================================================
--- Sandbox/gotcha/five.taskqueue/src/five/taskqueue/tests/processor.txt 2010-04-14 08:38:22 UTC (rev 110833)
+++ Sandbox/gotcha/five.taskqueue/src/five/taskqueue/tests/processor.txt 2010-04-14 08:50:42 UTC (rev 110834)
@@ -79,8 +79,6 @@
>>> print log_info
z3c.taskqueue INFO
- Call "/tasks/processNext"
- z3c.taskqueue INFO
Job: 1
Let's now use the processor from within the task service. Since the processor
@@ -108,26 +106,16 @@
>>> print log_info
z3c.taskqueue INFO
- Call "/tasks/processNext"
- z3c.taskqueue INFO
Job: 1
z3c.taskqueue INFO
starting service remotetasks.tasks.tasks
z3c.taskqueue INFO
- Call "/tasks/processNext"
- z3c.taskqueue INFO
Job: 2
z3c.taskqueue INFO
- Call "/tasks/processNext"
- z3c.taskqueue INFO
Job: 3
z3c.taskqueue INFO
- Call "/tasks/processNext"
- z3c.taskqueue INFO
Job: 4
z3c.taskqueue INFO
- Call "/tasks/processNext"
- z3c.taskqueue INFO
stopping service remotetasks.tasks.tasks
Transactions in jobs
More information about the checkins
mailing list