Skip to content

Instantly share code, notes, and snippets.

@tunjid
Created March 8, 2023 10:21
Show Gist options
  • Save tunjid/934a9c80642a09fa45103250a6aef800 to your computer and use it in GitHub Desktop.
Save tunjid/934a9c80642a09fa45103250a6aef800 to your computer and use it in GitHub Desktop.
// Copyright 2023 Google LLC.
// SPDX-License-Identifier: Apache-2.0
fun startUpSyncWork() = OneTimeWorkRequestBuilder<DelegatingWorker>()
.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
.setConstraints(SyncConstraints)
// You can add any other input data as necessary
.setInputData(SyncWorker::class.classNameData())
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment