def handle_warm_shutdown_request(self, *args, **kwargs): """ Handle the warm shutdown of a RQ worker. This cleans up any leftover records and marks the :class:`pulpcore.app.models.Worker` record as being a clean shutdown. Args: args (tuple): unused positional arguments kwargs (dict): unused keyword arguments """ mark_worker_offline(self.name, normal_shutdown=True) return super().handle_warm_shutdown_request(*args, **kwargs)
def handle_warm_shutdown_request(self, *args, **kwargs): """ Handle the warm shutdown of a RQ worker. This cleans up any leftover records and marks the :class:`pulpcore.app.models.Worker` record as being a clean shutdown. Args: args (tuple): unused positional arguments kwargs (dict): unused keyword arguments """ mark_worker_offline(self.name, normal_shutdown=True) return super().handle_warm_shutdown_request(*args, **kwargs)
def register_birth(self, *args, **kwargs): """ Handle the birth of a RQ worker. This creates the working directory and removes any vestige records from a previous worker with the same name. Args: args (tuple): unused positional arguments kwargs (dict): unused keyword arguments """ mark_worker_offline(self.name, normal_shutdown=True) working_dir = WorkerDirectory(self.name) working_dir.delete() working_dir.create() return super().register_birth(*args, **kwargs)
def register_birth(self, *args, **kwargs): """ Handle the birth of a RQ worker. This creates the working directory and removes any vestige records from a previous worker with the same name. Args: args (tuple): unused positional arguments kwargs (dict): unused keyword arguments """ mark_worker_offline(self.name, normal_shutdown=True) working_dir = WorkerDirectory(self.name) working_dir.delete() working_dir.create() return super().register_birth(*args, **kwargs)