Skip to content

Instantly share code, notes, and snippets.

@mmollaverdi
Created October 27, 2016 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmollaverdi/ea398bd9206a0e61e54e21b8f98954f6 to your computer and use it in GitHub Desktop.
Save mmollaverdi/ea398bd9206a0e61e54e21b8f98954f6 to your computer and use it in GitHub Desktop.
def getSystemStatusInfo(id: String): Future[SystemStatusInfo] = {
val systemFuture = fetchSystem(id)
val systemStatusFuture = fetchSystemStatus(id)
systemFuture.zip(systemStatusFuture).map {
case (system, systemStatus) => SystemStatusInfo(system, systemStatus)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment