enragedginger/akka-quartz-scheduler

Support for Akka Typed

froth opened this issue · 8 comments

froth commented

As the typed akka api is now the default in the akka project it would be nice if akka-quartz-scheduler would support it.

For example all api's that currently have the current format:

def schedule(name: String, receiver: ActorRef, msg: AnyRef)

should have an additional typed implemention of the form

def schedule[T](name: String, receiver: ActorRef[T], msg: T)

However it would require a typed implementation of SimpleActorMessageJob I think. My first thought for the content of the jobDataMap would be:

case class ReceiverWithMessage[T](receiver: ActorRef[T], msg: T)
val jobDataMap = Map[String, AnyRef](
      "logBus" -> system.eventStream,
      "receiverWithMessage" -> ReceiverWithMessage(receiver, msg)
    )

However I am currently not sure what to do with MessageRequireFireTime.

ngu04 commented

I have updated actor from 2.5.x to 2.6.x and now quartz actor doesn't have support for typed-actor so I wouldn't be able to use quartz or typed actor :-(

@froth @ngu04 I've opened a Pull Request, check it out!

Hey guys, I'm already using in production.
So, if you want to use before @enragedginger review PR #102

private val akkaQuartzVersion = "1.9.0-akka-2.6.x"
libraryDependencies += "com.enragedginger" %% "akka-quartz-scheduler" % akkaQuartzVersion
resolvers += "Bintray".at("https://dl.bintray.com/justa/maven/")```

The new release has been cut for this and is available on maven central.

@enragedginger why Travis is build not passing?

The QuartzSchedulerFunctionalSpec tests are flaky and have been that way for awhile now. If I run the whole test suite with sbt test two of the tests in that class fail. But just running the QuartzSchedulerFunctionalSpec tests alone results in success. If you could find a way to make them succeed 100% of the time, that'd be great.

The QuartzSchedulerFunctionalSpec tests are flaky and have been that way for awhile now. If I run the whole test suite with sbt test two of the tests in that class fail. But just running the QuartzSchedulerFunctionalSpec tests alone results in success. If you could find a way to make them succeed 100% of the time, that'd be great.

@enragedginger figure out that if we run the test method by your self (only the method) it works.
I think we have some concurrency problem in the test with Typed Actors. Can you help me to how to fix it?

@enragedginger it was my mistake!
Figure out that I´ve other test has a bug that occours in some cenarios...

ALL FIXED AT PR #103