[Checkins] SVN: Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/ allow to import z3c.taskqueue without depending on ZODB3
Godefroid Chapelle
gotcha at bubblenet.be
Wed Mar 31 12:01:32 EDT 2010
Log message for revision 110368:
allow to import z3c.taskqueue without depending on ZODB3
Changed:
U Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/README.txt
U Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/__init__.py
U Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/processor.txt
U Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/startlater.txt
-=-
Modified: Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/README.txt
===================================================================
--- Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/README.txt 2010-03-31 15:38:27 UTC (rev 110367)
+++ Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/README.txt 2010-03-31 16:01:32 UTC (rev 110368)
@@ -15,7 +15,7 @@
Let's now start by creating a single service:
>>> from z3c import taskqueue
- >>> service = taskqueue.TaskService()
+ >>> service = taskqueue.service.TaskService()
We can discover the available tasks:
@@ -28,7 +28,6 @@
>>> def echo(input):
... return input
- >>> import z3c.taskqueue.task
>>> echoTask = taskqueue.task.SimpleTask(echo)
The only API requirement on the converter is to be callable. Now we make sure
@@ -321,7 +320,7 @@
>>> from z3c.taskqueue import interfaces
>>> from zope.interface.verify import verifyClass, verifyObject
- >>> verifyClass(interfaces.ITaskService, taskqueue.TaskService)
+ >>> verifyClass(interfaces.ITaskService, taskqueue.service.TaskService)
True
>>> verifyObject(interfaces.ITaskService, service)
True
Modified: Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/__init__.py
===================================================================
--- Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/__init__.py 2010-03-31 15:38:27 UTC (rev 110367)
+++ Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/__init__.py 2010-03-31 16:01:32 UTC (rev 110368)
@@ -1,2 +0,0 @@
-# Make a package.
-from z3c.taskqueue.service import TaskService
Modified: Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/processor.txt
===================================================================
--- Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/processor.txt 2010-03-31 15:38:27 UTC (rev 110367)
+++ Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/processor.txt 2010-03-31 16:01:32 UTC (rev 110368)
@@ -13,8 +13,8 @@
1. Create the task service and add it to the root site:
- >>> from z3c.taskqueue import TaskService
- >>> tasks = TaskService()
+ >>> from z3c.taskqueue import service
+ >>> tasks = service.TaskService()
>>> sm = root['tasks'] = tasks
Modified: Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/startlater.txt
===================================================================
--- Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/startlater.txt 2010-03-31 15:38:27 UTC (rev 110367)
+++ Sandbox/gotcha/z3c.taskqueue/src/z3c/taskqueue/startlater.txt 2010-03-31 16:01:32 UTC (rev 110368)
@@ -11,14 +11,13 @@
Let's now start by creating a single service:
>>> from z3c import taskqueue
- >>> service = taskqueue.TaskService()
+ >>> service = taskqueue.service.TaskService()
Let's now define a task that simply echos an input string:
>>> def echo(input):
... return input
- >>> import z3c.taskqueue.task
>>> echoTask = taskqueue.task.SimpleTask(echo)
Let's now register the task as a utility:
More information about the checkins
mailing list