Пример #1
0
 def _save_noraise(self, process):
     try:
         self.save(process)
     except BaseException:
         LOGGER.error(
             "Exception raised trying to pickle process (pid={})\n{}".
             format(process.pid, traceback.format_exc()))
Пример #2
0
 def on_process_finish(self, process):
     try:
         self.save(process)
         self._release_process(process.pid, self.finished_directory)
     except pickle.PicklingError:
         LOGGER.error("exception raised trying to pickle process (pid={}) "
                      "during on_finish message.".format(process.pid))
     except ValueError:
         pass
Пример #3
0
    def persist_process(self, process):
        # If the process doesn't have a persisted state then persist it now
        if not path.isfile(self.get_running_path(process.pid)):
            try:
                self.save(process)
            except pickle.PicklingError as e:
                LOGGER.error(
                    "exception raised trying to pickle process (pid={}).\n"
                    "{}".format(process.pid, e.message))

        try:
            process.add_process_listener(self)
        except AssertionError:
            # Happens if we're already listening
            pass
Пример #4
0
 def on_process_wait(self, process):
     try:
         self.save(process)
     except pickle.PicklingError:
         LOGGER.error("exception raised trying to pickle process (pid={}) "
                      "during on_wait message.".format(process.pid))