def aps_rt_hottrace(self): print(tools.get_cur_time(), ' in aps_rt_hottrace') my_lock = filelock.CFileLock(sys._getframe().f_code.co_name) if my_lock.lock() is False: print(tools.get_cur_time(), ' out CSchedulerMgr ... aps_rt_hottrace, lock failed') return self.rt_hottrace.aps_hottrace() print(tools.get_cur_time(), ' out aps_rt_hottrace') my_lock.unlock()
def aps_hotspot(self): print(tools.get_cur_time(), ' in CSchedulerMgr ... aps_hotspot') # os.getpid()获取当前进程id os.getppid()获取父进程id print("aps_hotspot pid=", os.getpid(), " ppid=", os.getppid()) my_lock = filelock.CFileLock(sys._getframe().f_code.co_name) if my_lock.lock() is False: print(tools.get_cur_time(), ' out CSchedulerMgr ... aps_hotspot, lock failed') return self.rt_hotspot.aps_hotspot() print(tools.get_cur_time(), ' out CSchedulerMgr ... aps_hotspot') my_lock.unlock()
def aps_reatime_quotes(self): print(tools.get_cur_time(), ' in CSchedulerMgr ... aps_reatime_quotes') # os.getpid()获取当前进程id os.getppid()获取父进程id print("aps_reatime_quotes pid=", os.getpid(), " ppid=", os.getppid()) my_lock = filelock.CFileLock(sys._getframe().f_code.co_name) if my_lock.lock() is False: print(tools.get_cur_time(), ' out CSchedulerMgr ... aps_reatime_quotes, lock failed') return self.setting.set_config() self.rt_quotes.aps_reatime_quotes() print(tools.get_cur_time(), ' out CSchedulerMgr ... aps_reatime_quotes') my_lock.unlock()