Browse Source

Remove Task.after

Ask Solem 16 years ago
parent
commit
23ebf0da53
1 changed files with 0 additions and 12 deletions
  1. 0 12
      crunchy/task.py

+ 0 - 12
crunchy/task.py

@@ -34,10 +34,6 @@ class Task(object):
     def run(self, **kwargs):
         raise NotImplementedError("Tasks must define a run method.")
 
-    def after(self, task_id):
-        """This method is called when the task is sucessfully executed."""
-        pass
-
     def get_logger(self, **kwargs):
         """Get a process-aware logger object."""
         return setup_logger(**kwargs)
@@ -50,14 +46,6 @@ class Task(object):
         """Get a crunchy task message consumer."""
         return TaskConsumer(connection=DjangoAMQPConnection)
 
-class TaskExecutedTask(Task):
-    name = "crunchy-task-executed"
-
-    def run(self, task_id, task_name, **kwargs):
-        logger = self.get_logger(**kwargs)
-        logger.info("Task %s[%s] executed successfully." % (task_id, task_name))
-tasks.register(TaskExecutedTask)
-        
 
 class TestTask(Task):
     name = "crunchy-test-task"