package com.zxhyis.toolss.notification.task

import android.content.Context
import androidx.work.Worker
import androidx.work.WorkerParameters
import com.zxhyis.toolss.FileApp
import com.zxhyis.toolss.logic.LogEx


class NotificationWorker(context: Context, workerParams: WorkerParameters) : Worker(context, workerParams) {

    private val TAG = "NotificationWorker"
    override fun doWork(): Result {

        if (PeriodicTaskScheduler.instance?.isRunning == false) {
            LogEx.logDebug(TAG, "doWork start")
            PeriodicTaskScheduler.instance?.start(FileApp.fContext)
        }

        return Result.success()
    }
}