Created
October 24, 2012 00:56
-
-
Save ericacm/3943058 to your computer and use it in GitHub Desktop.
refreshWorkers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def refreshWorkers() { | |
val cs = clusterService.clusterStatus | |
for (participant <- cs.participants) { | |
val path = if (cs.current == participant) | |
akkaConfig.localActorPath(workerPath) | |
else | |
remotePathForParticipant( | |
akkaConfig, participant, workerPath) | |
val remoteRef = context.actorFor(path) | |
if (workers.get(remoteRef).isEmpty) | |
workers += remoteRef->None | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment