Skip to content

Commit

Permalink
fix: return future not coroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
newgene committed May 23, 2023
1 parent 55978e1 commit 06cf071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion biothings/utils/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,8 @@ async def defer_to_process(self, pinfo=None, func=None, *args, **kwargs):
"""keep the same signature as JobManager.defer_to_process. The passed pinfo is ignored.
defer_to_process will still run func in the thread using defer_to_thread method.
"""
return self.defer_to_thread(pinfo, func, *args, **kwargs)
fut = await self.defer_to_thread(pinfo, func, *args, **kwargs)
return fut

async def defer_to_thread(self, pinfo=None, func=None, *args):
"""keep the same signature as JobManager.defer_to_thread. The passed pinfo is ignored"""
Expand Down

0 comments on commit 06cf071

Please sign in to comment.