Skip to content

Commit 2f74cf5

Browse files
committed
nit
1 parent 8389960 commit 2f74cf5

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/codegen/runner/sandbox/middlewares.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ async def dispatch(self, request: TRequest, call_next: RequestResponseEndpoint)
3333
return await call_next(request)
3434

3535
async def process_request(self, request: TRequest, call_next: RequestResponseEndpoint) -> TResponse:
36-
background_tasks = BackgroundTasks()
3736
try:
3837
logger.info(f"> (CodemodRunMiddleware) Request: {request.url.path}")
3938
self.runner.codebase.viz.clear_graphviz_data()
4039
response = await call_next(request)
41-
response.background = background_tasks
4240
return response
4341

4442
except UserCodeException as e:
@@ -50,5 +48,4 @@ async def process_request(self, request: TRequest, call_next: RequestResponseEnd
5048
message = f"Unexpected error for {request.url.path}"
5149
logger.exception(message)
5250
res = JSONResponse(status_code=HTTPStatus.INTERNAL_SERVER_ERROR, content={"detail": message, "error": str(e), "traceback": traceback.format_exc()})
53-
res.background = background_tasks
5451
return res

0 commit comments

Comments
 (0)