mFetchWeatherTask = object : AsyncTask<Void, Void, Void>() {
override fun doInBackground(vararg voids: Void): Void? {
val context = applicationContext
SunshineSyncTask.syncWeather(context,compositeDisposable)
jobFinished(jobParameters, false)
return null
}
override fun onPostExecute(aVoid: Void?) {
jobFinished(jobParameters, false)
}
}
mFetchWeatherTask!!.execute()