dubeejw commented on a change in pull request #2218: Port Controller from Spray 
to Akka
URL: 
https://github.com/apache/incubator-openwhisk/pull/2218#discussion_r130376041
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/ApiUtils.scala
 ##########
 @@ -105,7 +107,7 @@ protected[controller] object FilterEntityList {
  * on an operation and terminate the HTTP request.
  */
 package object PostProcess {
-    type PostProcessEntity[A] = A => RequestContext => Unit
+    type PostProcessEntity[A] = A => RequestContext => Future[RouteResult]
 
 Review comment:
   From the Spray to Akka migration doc 
(http://doc.akka.io/docs/akka-http/10.0.8/scala/http/migration-guide/migration-from-spray.html):
 
   ```
   Changes in Route type
   Route type has changed from Route = RequestContext ? Unit to Route = 
RequestContext ? Future[RouteResult]. Which means that now we must complete the 
Request inside the controller and we can?t simply pass the request to another 
Actor and complete it there. This has been done intentionally, because in Spray 
it was easy to forget to complete requests but the code would still compile.
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to