We have a return_task function which takes an is_dispatch bool.
Almost everything in this function is just if is_dispatch {} else {}, so this PR just splits it into two separate functions:
dispatch_return_task and invocation_return_task.
We re-implemented this function in the body of response_class.
So, this PR also changes that logic to just call the new invocation_return_task.
We have a
return_task
function which takes anis_dispatch
bool. Almost everything in this function is justif is_dispatch {} else {}
, so this PR just splits it into two separate functions:dispatch_return_task
andinvocation_return_task
.We re-implemented this function in the body of
response_class
. So, this PR also changes that logic to just call the newinvocation_return_task
.