FIX AutoDL修复exception导致worker停止问题
This commit is contained in:
parent
1dfab45d83
commit
d0cc6f27b5
|
|
@ -61,13 +61,16 @@ class Server:
|
|||
def introspect_instance(self):
|
||||
loguru.logger.info("Introspecting worker started || Scaledown Window: %ds" % self.instance_pool.scaledown_window)
|
||||
while True:
|
||||
try:
|
||||
self.instance_pool.introspection()
|
||||
time.sleep(1)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
def scaling_worker(self):
|
||||
loguru.logger.info("Scaling worker started")
|
||||
try:
|
||||
while True:
|
||||
try:
|
||||
# 提交任务
|
||||
self.instance_pool.scale_instance(self.waiting_queue.get_size()+self.running_pool.get_running_size(), disable_shrink=True)
|
||||
for instance in self.instance_pool.instances:
|
||||
|
|
|
|||
Loading…
Reference in New Issue