當前位置: 首頁>>代碼示例>>Python>>正文


Python ProcessContext.create_pid_file方法代碼示例

本文整理匯總了Python中system.process_context.ProcessContext.create_pid_file方法的典型用法代碼示例。如果您正苦於以下問題:Python ProcessContext.create_pid_file方法的具體用法?Python ProcessContext.create_pid_file怎麽用?Python ProcessContext.create_pid_file使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在system.process_context.ProcessContext的用法示例。


在下文中一共展示了ProcessContext.create_pid_file方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from system.process_context import ProcessContext [as 別名]
# 或者: from system.process_context.ProcessContext import create_pid_file [as 別名]
    def __init__(self, process_name):
        """ renames process to SynergyYYY and creates PID file """
        self.process_name = process_name
        self.logger = ProcessContext.get_logger(process_name)

        # process-related activities
        setproctitle.setproctitle(settings['process_prefix'] + self.process_name)
        ProcessContext.create_pid_file(self.process_name)
開發者ID:strategist922,項目名稱:scheduler,代碼行數:10,代碼來源:synergy_process.py

示例2: __init__

# 需要導入模塊: from system.process_context import ProcessContext [as 別名]
# 或者: from system.process_context.ProcessContext import create_pid_file [as 別名]
    def __init__(self, process_name, process_id=None):
        """ renames process to SynergyYYY and creates PID file """
        self.process_name = process_name
        self.process_id = process_id
        self.logger = ProcessContext.get_logger(process_name, process_id=self.process_id)

        # process-related activities
        process_title = settings['process_prefix'] + self.process_name
        if self.process_id:
            process_title += str(self.process_id)
        setproctitle.setproctitle(process_title)
        ProcessContext.create_pid_file(self.process_name, process_id=self.process_id)
開發者ID:mushkevych,項目名稱:launch.py,代碼行數:14,代碼來源:synergy_process.py


注:本文中的system.process_context.ProcessContext.create_pid_file方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。