remove loop
This commit is contained in:
4
main.py
4
main.py
@@ -88,10 +88,8 @@ def main():
|
||||
logger = logging.getLogger("main")
|
||||
|
||||
db = Database(config_file_name)
|
||||
next_exec_time = time.time()
|
||||
config = config_load(config_file_path)
|
||||
|
||||
while True:
|
||||
logger.info("开始检查")
|
||||
try:
|
||||
old_config = config
|
||||
@@ -189,8 +187,6 @@ def main():
|
||||
logger.warning("%s: 订单状态为 %s,未加入追踪", order_detail["id"], order_detail["status"])
|
||||
|
||||
db.save()
|
||||
next_exec_time += config["interval"]
|
||||
time.sleep(max(0, next_exec_time - time.time()))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user