Feat: GET요청 시 Slack 메세지 제거
This commit is contained in:
parent
91fff1fb47
commit
3fba3e71ef
@ -28,10 +28,8 @@ async def resource_cleaner_middleware(request: Request, call_next):
|
|||||||
raise exc
|
raise exc
|
||||||
finally:
|
finally:
|
||||||
process_time = time.time() - start_time
|
process_time = time.time() - start_time
|
||||||
send_slack_message(f"처리 시간: {process_time}초")
|
if request.method != "GET":
|
||||||
for obj in gc.get_objects():
|
send_slack_message(f"처리 시간: {process_time}초")
|
||||||
if torch.is_tensor(obj):
|
|
||||||
del obj
|
|
||||||
gc.collect()
|
gc.collect()
|
||||||
torch.cuda.empty_cache()
|
torch.cuda.empty_cache()
|
||||||
return response
|
return response
|
||||||
|
Loading…
Reference in New Issue
Block a user