assert not self.is_alive(), "aborting attempt to purge metadata for a running process!"
meta_dir = self.get_metadata_dir()
logging.debug("purging metadata directory: {}".format(meta_dir))
try:
rm_rf(meta_dir)
except OSError as e:
raise self.MetadataError("failed to purge metadata directory {}: {!r}".format(meta_dir, e))
After Change
if not force and self.is_alive():
raise self.MetadataError("cannot purge metadata for a running process!")
super(ProcessManager, self).purge_metadata_by_name(self._name)
def _kill(self, kill_sig):
Send a signal to the current process.