From ec1c8f659f48a50ee7fc32801341953829bacdd1 Mon Sep 17 00:00:00 2001
From: Marius van den Beek <m.vandenbeek@gmail.com>
Date: Thu, 14 Apr 2016 20:39:05 +0200
Subject: [PATCH] Revert unnecessary changes

---
 pulsar/managers/stateful.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pulsar/managers/stateful.py b/pulsar/managers/stateful.py
index 6e25f2f6..b626d6cd 100644
--- a/pulsar/managers/stateful.py
+++ b/pulsar/managers/stateful.py
@@ -86,6 +86,7 @@ class StatefulManagerProxy(ManagerProxy):
                     job_directory.store_metadata(JOB_FILE_PREPROCESSING_FAILED, True)
                     job_directory.store_metadata("return_code", 1)
                     job_directory.write_file("stderr", str(e))
+                self.__state_change_callback(status.FAILED, job_id)
                 log.exception("Failed job preprocessing for job %s:", job_id)
 
         new_thread_for_job(self, "preprocess", job_id, do_preprocess, daemon=False)
@@ -150,7 +151,7 @@ class StatefulManagerProxy(ManagerProxy):
                 deactivate_method(job_id)
             except Exception:
                 log.exception("Failed to deactivate via proxied manager job %s" % job_id)
-        if proxy_status in [ status.COMPLETE, status.CANCELLED]:
+        if proxy_status == status.COMPLETE:
             self.__handle_postprocessing(job_id)
 
     def __handle_postprocessing(self, job_id):
-- 
GitLab