[Checkins] SVN: lovely.remotetask/branches/gotcha-z3c-taskqueue/src/lovely/remotetask/task.py import extracted code

Godefroid Chapelle gotcha at bubblenet.be
Thu Apr 22 07:19:39 EDT 2010


Log message for revision 111258:
  import extracted code
  

Changed:
  U   lovely.remotetask/branches/gotcha-z3c-taskqueue/src/lovely/remotetask/task.py

-=-
Modified: lovely.remotetask/branches/gotcha-z3c-taskqueue/src/lovely/remotetask/task.py
===================================================================
--- lovely.remotetask/branches/gotcha-z3c-taskqueue/src/lovely/remotetask/task.py	2010-04-22 10:43:36 UTC (rev 111257)
+++ lovely.remotetask/branches/gotcha-z3c-taskqueue/src/lovely/remotetask/task.py	2010-04-22 11:19:39 UTC (rev 111258)
@@ -11,46 +11,4 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Task Service Implementation
-
-$Id$
-"""
-__docformat__ = 'restructuredtext'
-
-import zope.interface
-
-from zope.schema.fieldproperty import FieldProperty
-
-from lovely.remotetask import interfaces
-
-
-class TaskError(Exception):
-    """An error occurred while executing the task."""
-    pass
-
-
-class SimpleTask(object):
-    """A simple, non-persistent task implementation."""
-    zope.interface.implements(interfaces.ITask)
-
-    inputSchema = FieldProperty(interfaces.ITask['inputSchema'])
-    outputSchema = FieldProperty(interfaces.ITask['outputSchema'])
-
-    def __init__(self, func):
-        self.func = func
-
-    def __call__(self, service, jobid, input):
-        return self.func(input)
-
-    def __repr__(self):
-        return '<%s %r>' %(self.__class__.__name__, self.func)
-
-
-class EchoTask(object):
-    zope.interface.implements(interfaces.ITask)
-
-    def __call__(self, service, input):
-        return input
-
-    def __repr__(self):
-        return '<%s>' %(self.__class__.__name__)
+from z3c.taskqueue.task import *



More information about the checkins mailing list