This commit is contained in:
yumoqing 2022-06-23 16:43:52 +08:00
parent 9209f5f62e
commit 51b55ef830

View File

@ -134,9 +134,12 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
with t: with t:
try: try:
x = await self._handle1(request) x = await self._handle1(request)
except: except Exception as e:
return None self.error(f'{name}:error={e}')
x = e
self.info(f'{name}:time cost={t.end_time - t.begin_time}') self.info(f'{name}:time cost={t.end_time - t.begin_time}')
if x is None:
return HTTPException()
return x return x
async def _handle1(self,request:Request) -> StreamResponse: async def _handle1(self,request:Request) -> StreamResponse: