Esempio n. 1
0
            def _post_setup(result):
                if not circuit.running_phase :
                    self.logger.warn("Method <%s> call for current phase is not valid" % name)
                    return False
                if from_dlp :
                    valid_method_name = get_dlp_method(circuit.running_phase.name)

                    if valid_method_name != name :
                        self.logger.warn("Recurrent phase %s ignored" % name)
                        return False
                dps = maybeDeferred(self._run_proxymethod, 
                                    launcher, 
                                    id, 
                                    name, 
                                    args, 
                                    circuit)
                @dps.addCallback
                def result_proxy(res):
                    return True

                @dps.addErrback
                def failed_proxy(failure):
                    self.logger.warn("Proxymethod execution failed: %s" % failure)
                    return False
                return dps
Esempio n. 2
0
            def _post_setup(result):
                if not circuit.running_phase:
                    self.logger.warn(
                        "Method <%s> call for current phase is not valid" %
                        name)
                    return False
                if from_dlp:
                    valid_method_name = get_dlp_method(
                        circuit.running_phase.name)

                    if valid_method_name != name:
                        self.logger.warn("Recurrent phase %s ignored" % name)
                        return False
                dps = maybeDeferred(self._run_proxymethod, launcher, id, name,
                                    args, circuit)

                @dps.addCallback
                def result_proxy(res):
                    return True

                @dps.addErrback
                def failed_proxy(failure):
                    self.logger.warn("Proxymethod execution failed: %s" %
                                     failure)
                    return False

                return dps
Esempio n. 3
0
 def completed_step(self, id, phase, stdout, stderr, exitcode):
     try:
         method = get_dlp_method(phase)
     except KeyError:
         logging.getLogger().warn("Method %s not declared" % phase)
         return False
     else:
         return xmlrpcCleanup(MscDispatcher().run_proxymethod(
             "dlp", id, method, (exitcode, stdout, stderr), True))
Esempio n. 4
0
 def completed_step(self, id, phase, stdout, stderr, exitcode):
     try:
         method = get_dlp_method(phase)
     except KeyError:
         logging.getLogger().warn("Method %s not declared" % phase)
         return False
     else :
         return xmlrpcCleanup(MscDispatcher().run_proxymethod("dlp",
                                            id,
                                            method,
                                            (exitcode, stdout, stderr),
                                            True
                                            ))