feat: 暂时注释ansible runner write pid 逻辑

pull/12971/head
Aaron3S 2024-04-09 16:29:08 +08:00 committed by Bryan
parent bc76ce50e1
commit c7b5cc7d89
1 changed files with 8 additions and 8 deletions

View File

@ -48,9 +48,9 @@ class DefaultCallback:
event = data.get('event', None)
if not event:
return
pid = data.get('pid', None)
if pid:
self.write_pid(pid)
# pid = data.get('pid', None)
# if pid:
# self.write_pid(pid)
event_data = data.get('event_data', {})
host = event_data.get('remote_addr', '')
task = event_data.get('task', '')
@ -160,9 +160,9 @@ class DefaultCallback:
self.status = self.STATUS_MAPPER.get(status, 'unknown')
rc = kwargs.get('runner_config', None)
self.private_data_dir = rc.private_data_dir if rc else '/tmp/'
# self.private_data_dir = rc.private_data_dir if rc else '/tmp/'
def write_pid(self, pid):
pid_filepath = os.path.join(self.private_data_dir, 'local.pid')
with open(pid_filepath, 'w') as f:
f.write(str(pid))
# def write_pid(self, pid):
# pid_filepath = os.path.join(self.private_data_dir, 'local.pid')
# with open(pid_filepath, 'w') as f:
# f.write(str(pid))