Closed diesalbla closed 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.
There are some images that don't match with the regular expression. For instance:
https://lh6.ggpht.com/feGL-tOxY65KXuqCBZlwanprjq6uD2AAE_eZzpG4LDcsQfkqbhdNrisZOpYJnUWZAdo=w300
Everything works really well. Great job!
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:
692, to create in the domain a
FullCard
class, that stores all the info needed for each package by all endpoints.691 A service to fetch the details of an app from Google's unofficial API.
701 A new service to use the web scrapper to fetch the details of an app.
695 A process to refresh the cache and solve
Pending
packages.693 A process that implements the new cache workflow.