mdedetrich commented on code in PR #226:
URL: 
https://github.com/apache/incubator-pekko-connectors/pull/226#discussion_r1484927141


##########
kinesis/src/main/scala/org/apache/pekko/stream/connectors/kinesis/impl/KinesisSchedulerSourceStage.scala:
##########
@@ -111,6 +112,23 @@ private[kinesis] class KinesisSchedulerSourceStage(
         failStage(SchedulerUnexpectedShutdown(e))
     }
     override def postStop(): Unit =
-      schedulerOpt.foreach(scheduler => Future(if 
(!scheduler.shutdownComplete()) scheduler.shutdown()))
+      schedulerOpt.foreach(scheduler =>
+        if (!scheduler.shutdownComplete()) scheduler.shutdown()
+      )
+
+    protected def executionContext(attributes: Attributes): ExecutionContext = 
{
+      val dispatcherId = 
(attributes.get[ActorAttributes.Dispatcher](ActorAttributes.IODispatcher) match 
{
+        case ActorAttributes.Dispatcher("") =>

Review Comment:
   Hmm, I guess its okay then but we should probably make a ticket to have a 
look at this separately since its code smell.



##########
kinesis/src/main/scala/org/apache/pekko/stream/connectors/kinesis/impl/KinesisSchedulerSourceStage.scala:
##########
@@ -111,6 +112,23 @@ private[kinesis] class KinesisSchedulerSourceStage(
         failStage(SchedulerUnexpectedShutdown(e))
     }
     override def postStop(): Unit =
-      schedulerOpt.foreach(scheduler => Future(if 
(!scheduler.shutdownComplete()) scheduler.shutdown()))
+      schedulerOpt.foreach(scheduler =>
+        if (!scheduler.shutdownComplete()) scheduler.shutdown()
+      )
+
+    protected def executionContext(attributes: Attributes): ExecutionContext = 
{
+      val dispatcherId = 
(attributes.get[ActorAttributes.Dispatcher](ActorAttributes.IODispatcher) match 
{
+        case ActorAttributes.Dispatcher("") =>

Review Comment:
   Hmm, I guess its okay then but we should probably make a ticket to have a 
look at this separately since it looks like code smell.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to