xebia-functional / nine-cards-v2

An Open Source Android Launcher built with Scala on Android
http://www.9cards.io/
Other
184 stars 20 forks source link

Redis Cache Improvements #694

Closed diesalbla closed 8 years ago

diesalbla commented 8 years ago

This ticket aggregates the several tickets needed to transform the Google Play Backend component to the new cache workflow, as researched in the Spike ticket.

Some of the task tickets carried on by this ticket are the following ones:

diesalbla commented 8 years ago

At present, there is no endpoint to run the refresh cache process. To test it, you should run sbt console with the application.conf configuration file, and then paste in the Scala console the following lines:

def refreshN(num: Int) = {
  import com.fortysevendeg.extracats.taskMonad
  import com.fortysevendeg.ninecards.googleplay.processes._
  import com.fortysevendeg.ninecards.googleplay.service.free._
  import org.joda.time.DateTime
  val proc = CardsProcess.processes[JoinServices]
  val inter = new Wiring().appCardService.interpreter
  val oper = proc.searchAndResolvePending( num, DateTime.now() )
  oper.foldMap(inter)
}

Once that is done, you should then run refreshN(10).run to see the effect. The response is an object with the lists of previously pending objects that have been resolved, found to be erroneous, or kept as pending.

diesalbla commented 8 years ago

Here is the PR.

franciscodr commented 8 years ago

There are some images that don't match with the regular expression. For instance: https://lh6.ggpht.com/feGL-tOxY65KXuqCBZlwanprjq6uD2AAE_eZzpG4LDcsQfkqbhdNrisZOpYJnUWZAdo=w300

franciscodr commented 8 years ago

Everything works really well. Great job!