Attach logs to background process

This commit is contained in:
Neeraj Gupta 2022-10-18 13:30:29 +05:30
parent 9032555cee
commit 0a70e9869f
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -112,10 +112,11 @@ Future<void> _runInBackground(String taskId) async {
// https://stackoverflow.com/a/73796478/546896
@pragma('vm:entry-point')
void _headlessTaskHandler(HeadlessTask task) {
print("_headlessTaskHandler");
if (task.timeout) {
BackgroundFetch.finish(task.taskId);
} else {
_runInBackground(task.taskId);
_runBackgroundTask(task.taskId);
}
}