-
-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port play-scala-websocket-example to Akka Typed #62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think stopping needs fixing. The rest LGTM
d803380
to
2f1c44c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thansk @dwijnand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I was in the middle of a review and then this got merged
@@ -75,7 +78,7 @@ class UserActor @Inject()(@Assisted id: String, @Named("stocksActor") stocksActo | |||
// from the browse), using a coupled sink and source. | |||
Flow.fromSinkAndSourceCoupled(jsonSink, hubSource).watchTermination() { (_, termination) => | |||
// When the flow shuts down, make sure this actor also stops. | |||
termination.foreach(_ => context.stop(self)) | |||
termination.foreach((_: Done) => context.stop(context.self)) // XXX: is self a child? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you mean by "is self a child"? A child from whom?
I would just write it as follows:
termination.foreach((_: Done) => context.stop(context.self)) // XXX: is self a child? | |
termination.foreach(_ => context.stop(context.self)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think context.stop
doesn't work for self, thus the comment. (I'm not sure how to replace this bit.)
And I like the type annotation on the parameter to make sure I'm not discarding something useful, like a Boolean
or something.
extends Actor { | ||
import Messages._ | ||
class UserActor @Inject()(id: String, stocksActor: ActorRef[GetStocks])(implicit | ||
mat: Materializer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove the need to pass a Materializer
, an ExecutionContext
and Scheduler
altogether. ActorContext
should give us everything.
Followed up in #64. |
…ork#62) **/plugins.sbt: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.21") **build.gradle: def playVersion = "2.6.21"
….6.x * play-java-dagger2-example/2.6.x: (54 commits) Nest play-java-dagger2-example Updated with template-control on 2019-02-13T20:17:46.578Z (playframework#68) Updated with template-control on 2019-02-01T10:40:33.806Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-17T15:10:57.939Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-16T12:08:46.044Z /LICENSE: wrote /LICENSE /NOTICE: wrote /NOTICE /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-08T14:44:41.654Z (playframework#62) Updated with template-control on 2019-01-04T17:13:23.822Z (playframework#57) Upgrade branch 2.6.x using TemplateControl (playframework#55) Updated with template-control on 2018-10-08T19:11:41.278Z **/plugins.sbt: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20") **build.gradle: def playVersion = "2.6.20" Updated with template-control on 2018-09-11T20:14:50.057Z (playframework#51) Updated with template-control on 2018-08-20T20:37:13.729Z (playframework#50) Updated with template-control on 2018-07-19T01:58:55.841Z (playframework#48) Updated with template-control on 2018-07-16T18:38:45.352Z (playframework#47) Upgrade branch 2.6.x using TemplateControl (playframework#46) Updated with template-control on 2018-05-27T23:54:09.491Z (playframework#45) Updated with template-control on 2018-04-06T19:34:57.948Z (playframework#43) Updated with template-control on 2018-03-02T18:56:28.165Z (playframework#41) Upgrade branch 2.6.x using TemplateControl (playframework#40) Fix cross build to sbt 1.1.0 (playframework#39) Upgrade branch 2.6.x using TemplateControl (playframework#38) ...
* play-java-ebean-example/2.6.x: (52 commits) Nest play-java-ebean-example Updated with template-control on 2019-02-13T20:25:39.252Z (playframework#96) Upgrade branch 2.6.x using TemplateControl (playframework#94) Upgrade branch 2.6.x using TemplateControl (playframework#93) Upgrade branch 2.6.x using TemplateControl (playframework#92) Updated with template-control on 2019-01-08T14:44:41.376Z (playframework#89) Upgrade branch 2.6.x using TemplateControl (playframework#85) Upgrade branch 2.6.x using TemplateControl (playframework#83) Upgrade branch 2.6.x using TemplateControl (playframework#79) Updated with template-control on 2018-09-11T20:14:50.116Z (playframework#77) Updated with template-control on 2018-08-20T20:37:13.842Z (playframework#76) Updated with template-control on 2018-07-19T01:58:55.623Z (playframework#74) Updated with template-control on 2018-07-16T18:38:45.357Z (playframework#73) Upgrade branch 2.6.x using TemplateControl (playframework#72) Updated with template-control on 2018-05-27T23:54:09.409Z (playframework#71) Updated with template-control on 2018-04-06T19:34:58.195Z (playframework#68) Updated with template-control on 2018-03-02T18:56:28.219Z (playframework#67) Updated with template-control on 2018-01-11T21:32:27.151Z (playframework#64) Fix cross build to sbt 1.1.0 (playframework#63) Updated with template-control on 2018-01-09T20:17:10.839Z (playframework#62) ...
….6.x * play-java-starter-example/2.6.x: (57 commits) Nest play-java-starter-example Updated with template-control on 2019-02-13T20:25:39.664Z (playframework#103) Upgrade branch 2.6.x using TemplateControl (playframework#99) Upgrade branch 2.6.x using TemplateControl (playframework#98) Upgrade branch 2.6.x using TemplateControl (playframework#97) Updated with template-control on 2019-01-08T14:44:42.254Z (playframework#95) Updated with template-control on 2019-01-04T17:13:24.036Z (playframework#90) Upgrade branch 2.6.x using TemplateControl (playframework#89) Improve README (playframework#81) Upgrade branch 2.6.x using TemplateControl (playframework#79) Updated with template-control on 2018-09-11T20:14:50.628Z (playframework#78) Updated with template-control on 2018-08-20T20:37:14.072Z (playframework#77) Updated with template-control on 2018-07-19T01:58:56.147Z (playframework#74) Updated with template-control on 2018-07-16T18:38:45.658Z (playframework#73) Upgrade branch 2.6.x using TemplateControl (playframework#71) Updated with template-control on 2018-05-27T23:54:09.356Z (playframework#69) Updated with template-control on 2018-04-06T19:34:58.808Z (playframework#66) Change disabled to enabled (playframework#64) Use discuss forum (playframework#62) Enable localhost:9000 as allowed host by default. (playframework#61) ...
… 2.6.x * play-java-streaming-example/2.6.x: (45 commits) Nest play-java-streaming-example Updated with template-control on 2019-02-13T20:25:39.687Z (playframework#81) Upgrade branch 2.6.x using TemplateControl (playframework#79) Upgrade branch 2.6.x using TemplateControl (playframework#78) Upgrade branch 2.6.x using TemplateControl (playframework#77) Updated with template-control on 2019-01-08T14:44:41.668Z (playframework#75) Updated with template-control on 2019-01-04T17:13:23.629Z (playframework#70) Upgrade branch 2.6.x using TemplateControl (playframework#69) Upgrade branch 2.6.x using TemplateControl (playframework#66) Updated with template-control on 2018-09-11T20:14:50.512Z (playframework#65) Updated with template-control on 2018-08-20T20:37:13.644Z (playframework#64) Updated with template-control on 2018-07-19T01:58:55.832Z (playframework#62) Updated with template-control on 2018-07-16T18:38:45.449Z (playframework#61) Upgrade branch 2.6.x using TemplateControl (playframework#60) Updated with template-control on 2018-05-27T23:54:09.459Z (playframework#59) Updated with template-control on 2018-04-06T19:34:58.233Z (playframework#57) Updated with template-control on 2018-03-02T18:56:28.174Z (playframework#56) Upgrade branch 2.6.x using TemplateControl (playframework#55) Fix cross build to sbt 1.1.0 (playframework#54) Upgrade branch 2.6.x using TemplateControl (playframework#53) ...
…to 2.6.x * play-scala-fileupload-example/2.6.x: (50 commits) Nest play-scala-fileupload-example Updated with template-control on 2019-02-13T20:25:39.491Z (playframework#78) Updated with template-control on 2019-02-01T10:40:33.510Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-17T15:10:57.985Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-16T12:08:45.799Z /LICENSE: wrote /LICENSE /NOTICE: wrote /NOTICE /.mergify.yml: wrote /.mergify.yml **build.gradle: playTest "org.scalatestplus.play:scalatestplus-play_$scalaVersion:3.1.2" Updated with template-control on 2019-01-08T14:44:41.664Z (playframework#72) Updated with template-control on 2019-01-04T17:13:23.928Z (playframework#67) Upgrade branch 2.6.x using TemplateControl (playframework#66) Updated with template-control on 2018-10-08T19:11:40.600Z **/plugins.sbt: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20") **build.gradle: def playVersion = "2.6.20" Update application.conf (playframework#62) Updated with template-control on 2018-09-11T20:14:49.954Z (playframework#61) Updated with template-control on 2018-08-20T20:37:13.724Z (playframework#60) Updated with template-control on 2018-07-19T01:58:55.837Z (playframework#58) Updated with template-control on 2018-07-16T18:38:45.429Z (playframework#57) Upgrade branch 2.6.x using TemplateControl (playframework#56) Updated with template-control on 2018-05-27T23:54:09.258Z (playframework#55) Updated with template-control on 2018-04-06T19:34:57.720Z (playframework#53) Update application.conf Update application.conf Add explicit file upload limit ...
…' into 2.6.x * play-scala-isolated-slick-example/2.6.x: (53 commits) Nest play-scala-isolated-slick-example Updated with template-control on 2019-02-13T20:25:39.661Z (playframework#84) Updated with template-control on 2019-02-01T10:40:33.042Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-17T15:10:58.033Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-16T12:08:45.882Z /LICENSE: wrote /LICENSE /NOTICE: wrote /NOTICE /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-08T14:44:41.929Z (playframework#78) Upgrade branch 2.6.x using TemplateControl (playframework#73) Remove JDK 9 & 10 Updated with template-control on 2018-11-29T15:50:43.213Z /.mergify.yml: wrote /.mergify.yml **build.sbt: scalaVersion := "2.12.7" Updated with template-control on 2018-10-08T19:11:41.295Z **/plugins.sbt: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20") Updated with template-control on 2018-09-11T20:14:50.342Z (playframework#68) Updated with template-control on 2018-08-20T19:30:29.032Z (playframework#67) Updated with template-control on 2018-07-19T01:58:56.035Z (playframework#65) Updated with template-control on 2018-07-16T18:38:45.677Z (playframework#64) Upgrade branch 2.6.x using TemplateControl (playframework#63) Updated with template-control on 2018-05-27T23:54:09.691Z (playframework#62) Updated with template-control on 2018-04-06T19:34:57.999Z (playframework#60) Upgrade branch 2.6.x using TemplateControl (playframework#58) Fix cross build to sbt 1.1.0 (playframework#55) Update Play to version 2.6.10 (playframework#52) ...
…to 2.6.x * play-scala-macwire-di-example/2.6.x: (65 commits) Nest play-scala-macwire-di-example Updated with template-control on 2019-02-13T20:25:39.672Z (playframework#82) Updated with template-control on 2019-02-01T10:40:33.270Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-17T15:10:57.898Z /.mergify.yml: wrote /.mergify.yml Updated with template-control on 2019-01-16T12:08:46.033Z /LICENSE: wrote /LICENSE /NOTICE: wrote /NOTICE /.mergify.yml: wrote /.mergify.yml **build.gradle: playTest "org.scalatestplus.play:scalatestplus-play_$scalaVersion:3.1.2" Updated with template-control on 2019-01-08T14:44:44.697Z (playframework#76) Updated with template-control on 2019-01-04T17:13:23.938Z (playframework#71) Upgrade branch 2.6.x using TemplateControl (playframework#70) Updated with template-control on 2018-10-08T19:11:40.533Z **/plugins.sbt: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20") **build.gradle: def playVersion = "2.6.20" Updated with template-control on 2018-09-11T20:14:50.619Z (playframework#66) Updated with template-control on 2018-08-20T20:37:13.853Z (playframework#65) Updated with template-control on 2018-07-19T01:58:55.845Z (playframework#63) Updated with template-control on 2018-07-16T18:38:45.430Z (playframework#62) Upgrade branch 2.6.x using TemplateControl (playframework#61) Updated with template-control on 2018-05-27T23:54:10.362Z (playframework#60) Updated with template-control on 2018-04-06T19:34:59.235Z (playframework#58) Updated with template-control on 2018-03-02T18:56:30.403Z (playframework#57) Upgrade branch 2.6.x using TemplateControl (playframework#56) Fix cross build to sbt 1.1.0 (playframework#55) Upgrade branch 2.6.x using TemplateControl (playframework#54) ...
…' into 2.6.x * play-scala-secure-session-example/2.6.x: (70 commits) Nest play-scala-secure-session-example Updated with template-control on 2019-02-13T20:17:46.435Z (playframework#95) Updated with template-control on 2019-02-01T10:40:32.758Z (playframework#93) Upgrade branch 2.6.x using TemplateControl (playframework#92) Upgrade branch 2.6.x using TemplateControl (playframework#91) Upgrade branch 2.6.x using TemplateControl (playframework#89) Upgrade branch 2.6.x using TemplateControl (playframework#82) Upgrade branch 2.6.x using TemplateControl (playframework#81) adds mergify file (playframework#79) Upgrade branch 2.6.x using TemplateControl (playframework#77) Updated with template-control on 2018-08-20T20:37:13.861Z (playframework#71) Updated with template-control on 2018-07-19T01:58:55.998Z (playframework#69) Updated with template-control on 2018-07-16T18:38:45.458Z (playframework#68) Upgrade branch 2.6.x using TemplateControl (playframework#66) Updated with template-control on 2018-05-27T23:54:09.617Z (playframework#65) Updated with template-control on 2018-04-06T19:34:58.475Z (playframework#63) Updated with template-control on 2018-03-02T18:56:28.210Z (playframework#62) Upgrade branch 2.6.x using TemplateControl (playframework#61) Fix cross build to sbt 1.1.0 (playframework#60) Upgrade branch 2.6.x using TemplateControl (playframework#59) ...
* play-scala-slick-example/2.6.x: (55 commits) Nest play-scala-slick-example Updated with template-control on 2019-02-13T20:25:39.652Z (playframework#92) Upgrade branch 2.6.x using TemplateControl (playframework#90) Updated with template-control on 2019-01-17T15:10:58.253Z (playframework#89) Upgrade branch 2.6.x using TemplateControl (playframework#88) Updated with template-control on 2019-01-08T14:44:41.666Z (playframework#85) Updated with template-control on 2019-01-04T17:13:23.925Z (playframework#79) Upgrade branch 2.6.x using TemplateControl (playframework#78) Upgrade branch 2.6.x using TemplateControl (playframework#75) Updated with template-control on 2018-09-11T20:14:50.417Z (playframework#74) Updated with template-control on 2018-08-20T20:37:13.878Z (playframework#73) Updated with template-control on 2018-07-19T01:58:55.997Z (playframework#71) Updated with template-control on 2018-07-16T18:38:45.495Z (playframework#70) Upgrade branch 2.6.x using TemplateControl (playframework#68) Updated with template-control on 2018-05-27T23:54:09.171Z (playframework#67) Updated with template-control on 2018-04-06T19:34:57.974Z (playframework#65) Updated with template-control on 2018-03-02T18:56:28.233Z (playframework#64) Upgrade branch 2.6.x using TemplateControl (playframework#63) Fix cross build to sbt 1.1.0 (playframework#62) Upgrade branch 2.6.x using TemplateControl (playframework#61) ...
…o 2.6.x * play-scala-streaming-example/2.6.x: (52 commits) Nest play-scala-streaming-example Updated with template-control on 2019-02-13T20:25:39.555Z (playframework#77) Upgrade branch 2.6.x using TemplateControl (playframework#75) Upgrade branch 2.6.x using TemplateControl (playframework#74) Upgrade branch 2.6.x using TemplateControl (playframework#73) Updated with template-control on 2019-01-08T14:44:41.633Z (playframework#71) Updated with template-control on 2019-01-04T17:13:23.822Z (playframework#67) Upgrade branch 2.6.x using TemplateControl (playframework#66) Upgrade branch 2.6.x using TemplateControl (playframework#63) Updated with template-control on 2018-09-11T20:14:50.169Z (playframework#62) Updated with template-control on 2018-08-20T20:37:13.651Z (playframework#60) Updated with template-control on 2018-07-16T18:38:45.481Z (playframework#59) Upgrade branch 2.6.x using TemplateControl (playframework#58) Updated with template-control on 2018-05-27T23:54:09.895Z (playframework#57) Updated with template-control on 2018-04-06T19:34:57.566Z (playframework#56) current -> latest (playframework#55) Updated with template-control on 2018-03-02T18:56:28.085Z (playframework#54) Upgrade branch 2.6.x using TemplateControl (playframework#53) Fix cross build to sbt 1.1.0 (playframework#52) Upgrade branch 2.6.x using TemplateControl (playframework#51) ...
No description provided.