Last active
September 3, 2015 11:32
-
-
Save kanuku/cd656d828c5f3cc69817 to your computer and use it in GitHub Desktop.
Future does not get executed.
This file contains 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 saveApps(input: Seq[AppInfo]) = { | |
logger.info(s"Apps to save:" + input.size) | |
db.run(this.apps ++= input).map(_ => ()) | |
} | |
def appInfos(): Future[Seq[AppInfo]] = { | |
logger.info("Searching") | |
val result = db.run(apps.result) | |
logger.info("Found something:"+result) | |
result | |
} | |
def test() = { | |
system.scheduler.schedule(0 minutes, 15 seconds) { | |
logger.info("Started storing data in db") | |
val input = List(new AppInfo("scm_url1", "doc_url1", "spec_url1", "last_modified1")) | |
dataStore.saveApps(input) | |
dataStore.appInfos().map { x => | |
logger.info("Future was executed.") | |
logger.info(" result = >>>>>" + x.size) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment