LoggingReceive with implicit ActorContext instead of ActorSystem. See #1720
This commit is contained in:
parent
519ce8a142
commit
52aa4f2a64
4 changed files with 13 additions and 17 deletions
|
|
@ -68,7 +68,6 @@ object Worker {
|
|||
class Worker extends Actor with ActorLogging {
|
||||
import Worker._
|
||||
import CounterService._
|
||||
implicit def system = context.system
|
||||
implicit val askTimeout = Timeout(5 seconds)
|
||||
|
||||
// Stop the CounterService child if it throws ServiceUnavailable
|
||||
|
|
@ -113,7 +112,6 @@ class CounterService extends Actor {
|
|||
import CounterService._
|
||||
import Counter._
|
||||
import Storage._
|
||||
implicit def system = context.system
|
||||
|
||||
// Restart the storage child when StorageException is thrown.
|
||||
// After 3 restarts within 5 seconds it will be stopped.
|
||||
|
|
@ -204,7 +202,6 @@ class Counter(key: String, initialValue: Long) extends Actor {
|
|||
import Counter._
|
||||
import CounterService._
|
||||
import Storage._
|
||||
implicit def system = context.system
|
||||
|
||||
var count = initialValue
|
||||
var storage: Option[ActorRef] = None
|
||||
|
|
@ -246,7 +243,6 @@ object Storage {
|
|||
*/
|
||||
class Storage extends Actor {
|
||||
import Storage._
|
||||
implicit def system = context.system
|
||||
|
||||
val db = DummyDB
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ object TestkitDocSpec {
|
|||
class LoggingActor extends Actor {
|
||||
//#logging-receive
|
||||
import akka.event.LoggingReceive
|
||||
implicit def system = context.system
|
||||
def receive = LoggingReceive(this) {
|
||||
case msg ⇒ // Do something...
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue