Skip to content

Instantly share code, notes, and snippets.

@ifucolo
Created August 2, 2022 18:22
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 ifucolo/e982c959ae57fb3104b5277bd9ee1f6e to your computer and use it in GitHub Desktop.
Save ifucolo/e982c959ae57fb3104b5277bd9ee1f6e to your computer and use it in GitHub Desktop.
override suspend fun fetchFreshJobs() {
withContext(coroutineDispatcher) {
serverApi.fetchJobs()
.also { jobs ->
jobsDao.updateData(jobs.map { it.asCache() })
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment