Lines Matching refs:pidfile_id
334 def _get_drone_for_pidfile_id(self, pidfile_id): argument
335 pidfile_contents = self.get_pidfile_contents(pidfile_id)
342 for pidfile_id, info in self._registered_pidfile_info.items():
344 logging.warning('dropping leaked pidfile %s', pidfile_id)
345 self.unregister_pidfile(pidfile_id)
389 pidfile_id = PidfileId(pidfile_path)
391 store_in_dict[pidfile_id] = contents
418 for pidfile_id, contents in self._pidfiles.iteritems():
423 info = self._registered_pidfile_info[pidfile_id]
452 pidfile_paths = [pidfile_id.path
453 for pidfile_id in self._registered_pidfile_info]
750 pidfile_id = PidfileId(pidfile_path)
751 self.register_pidfile(pidfile_id)
752 self._registered_pidfile_info[pidfile_id].num_processes = num_processes
753 return pidfile_id
761 def register_pidfile(self, pidfile_id): argument
766 if pidfile_id not in self._registered_pidfile_info:
767 logging.info('monitoring pidfile %s', pidfile_id)
768 self._registered_pidfile_info[pidfile_id] = _PidfileInfo()
769 self._reset_pidfile_age(pidfile_id)
772 def _reset_pidfile_age(self, pidfile_id): argument
773 if pidfile_id in self._registered_pidfile_info:
774 self._registered_pidfile_info[pidfile_id].age = 0
777 def unregister_pidfile(self, pidfile_id): argument
778 if pidfile_id in self._registered_pidfile_info:
779 logging.info('forgetting pidfile %s', pidfile_id)
780 del self._registered_pidfile_info[pidfile_id]
783 def declare_process_count(self, pidfile_id, num_processes): argument
784 self._registered_pidfile_info[pidfile_id].num_processes = num_processes
787 def get_pidfile_contents(self, pidfile_id, use_second_read=False): argument
793 self._reset_pidfile_age(pidfile_id)
798 return pidfile_map.get(pidfile_id, PidfileContents())