#1 이전 글
위 게시글의 완성된 앱을 일부 수정해서, Worker의 Chaining을 병렬로 구성해본다.
#2 Parallel Chaining
이전 게시글의 Work Chaining의 심화판이다. 파란 네모끼리는 실행 순서가 보장되지만, 파란 네모 안의 Worker들끼리는 실행 순서가 보장되지 않는다. 즉, 파란 네모 안의 Worker들은 동시다발적으로 뒤죽박죽 실행된다 (#4의 로그 메시지 참조).
#3 코드 수정
#3-1 OtherWorker2.kt 생성
...
class OtherWorker2(context: Context, params: WorkerParameters) : Worker(context, params) {
...
}
UploadWorker.kt와 파일 이름 및 클래스 이름을 제외하고 모두 동일한 Worker 클래스를 만든다.
#3-2 AnotherWorker2.kt 생성
...
class AnotherWorker2(context: Context, params: WorkerParameters) : Worker(context, params) {
...
}
#3-1과 같은 과정으로 수정한다.
#3-3 AnotherWorker3.kt 생성
...
class AnotherWorker3(context: Context, params: WorkerParameters) : Worker(context, params) {
...
}
#3-1과 같은 과정으로 수정한다.
#3-4 MainActivity.kt
...
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
...
}
private fun setOneTimeWorkRequest() {
// WorkRequest 객체 만들기
val uploadRequest = OneTimeWorkRequest
.Builder(UploadWorker::class.java)
.build()
val otherWorker = OneTimeWorkRequest
.Builder(OtherWorker::class.java)
.build()
val otherWorker2 = OneTimeWorkRequest
.Builder(OtherWorker2::class.java)
.build()
val anotherWorker = OneTimeWorkRequest
.Builder(AnotherWorker::class.java)
.build()
val anotherWorker2 = OneTimeWorkRequest
.Builder(AnotherWorker2::class.java)
.build()
val anotherWorker3 = OneTimeWorkRequest
.Builder(AnotherWorker3::class.java)
.build()
val parallelChain1 = mutableListOf<OneTimeWorkRequest>().apply {
add(otherWorker)
add(otherWorker2)
}
val parallelChain2 = mutableListOf<OneTimeWorkRequest>().apply {
add(anotherWorker)
add(anotherWorker2)
add(anotherWorker3)
}
// WorkManager 객체의 작업 큐(Job queue)에 WorkRequest 등록
workManager
.beginWith(parallelChain1)
.then(parallelChain2)
.then(uploadRequest)
.enqueue()
// WorkInfo는 작업에 대한 정보를 담은 객체.
// WorkManager.getWorkInfoByIdLiveData()는 LiveData<WorkInfo>를 반환.
...
}
private fun setPeriodicWorkRequest() {
...
}
}
이전 게시글과의 차이는, WorkManager.beginWith() 자리 및 WorkManager.then() 자리에 OneTimeWorkRequest 대신 MutableList<OneTimeWorkRequest>가 들어간다는 점이다.
#3-5 ChainInitiationWorker
...
class ChainInitiationWorker(context: Context, params: WorkerParameters) : Worker(context, params) {
override fun doWork(): Result {
try {
val workManager = ...
// WorkRequest 객체 만들기
val downloadRequest = OneTimeWorkRequest
.Builder(DownloadWorker::class.java)
.build()
val otherWorker = OneTimeWorkRequest
.Builder(OtherWorker::class.java)
.build()
val otherWorker2 = OneTimeWorkRequest
.Builder(OtherWorker2::class.java)
.build()
val anotherWorker = OneTimeWorkRequest
.Builder(AnotherWorker::class.java)
.build()
val anotherWorker2 = OneTimeWorkRequest
.Builder(AnotherWorker2::class.java)
.build()
val anotherWorker3 = OneTimeWorkRequest
.Builder(AnotherWorker3::class.java)
.build()
val parallelChain1 = mutableListOf<OneTimeWorkRequest>().apply {
add(otherWorker)
add(otherWorker2)
}
val parallelChain2 = mutableListOf<OneTimeWorkRequest>().apply {
add(anotherWorker)
add(anotherWorker2)
add(anotherWorker3)
}
Log.i(...)
workManager
.beginWith(parallelChain1)
.then(parallelChain2)
.then(downloadRequest)
.enqueue()
Log.i(...)
return Result.success()
} catch (e: Exception) {
return Result.failure()
}
}
private fun getNowTime(): String {
...
}
}
#3-4와 마찬가지로 이전 게시글과의 차이는, WorkManager.beginWith() 자리 및 WorkManager.then() 자리에 OneTimeWorkRequest 대신 MutableList<OneTimeWorkRequest>가 들어간다는 점이다.
#4 작동 확인
#4-1 'One Time Request' 버튼을 클릭했을 때의 로그 메시지
(MainActivity) UploadWorker's state: BLOCKED
(OtherWorker) Started at 2024/06/17 10:28:07
(OtherWorker) Progress: 0/100
(OtherWorker) Progress: 1/100
(OtherWorker) Progress: 2/100
(OtherWorker) Progress: 3/100
(OtherWorker) Progress: 4/100
(OtherWorker) Progress: 5/100
(OtherWorker) Progress: 6/100
(OtherWorker) Progress: 7/100
(OtherWorker) Progress: 8/100
(OtherWorker) Progress: 9/100
(OtherWorker) Progress: 10/100
(OtherWorker) Progress: 11/100
(OtherWorker) Progress: 12/100
(OtherWorker) Progress: 13/100
(OtherWorker) Progress: 14/100
(OtherWorker) Progress: 15/100
(OtherWorker) Progress: 16/100
(OtherWorker) Progress: 17/100
(OtherWorker) Progress: 18/100
(OtherWorker) Progress: 19/100
(OtherWorker) Progress: 20/100
(OtherWorker) Progress: 21/100
(OtherWorker) Progress: 22/100
(OtherWorker) Progress: 23/100
(OtherWorker) Progress: 24/100
(OtherWorker) Progress: 25/100
(OtherWorker) Progress: 26/100
(OtherWorker) Progress: 27/100
(OtherWorker) Progress: 28/100
(OtherWorker) Progress: 29/100
(OtherWorker) Progress: 30/100
(OtherWorker) Progress: 31/100
(OtherWorker) Progress: 32/100
(OtherWorker) Progress: 33/100
(OtherWorker) Progress: 34/100
(OtherWorker2) Started at 2024/06/17 10:28:07
(OtherWorker) Progress: 35/100
(OtherWorker) Progress: 36/100
(OtherWorker2) Progress: 0/100
(OtherWorker2) Progress: 1/100
(OtherWorker2) Progress: 2/100
(OtherWorker) Progress: 37/100
(OtherWorker) Progress: 38/100
(OtherWorker2) Progress: 3/100
(OtherWorker) Progress: 39/100
(OtherWorker) Progress: 40/100
(OtherWorker) Progress: 41/100
(OtherWorker) Progress: 42/100
(OtherWorker) Progress: 43/100
(OtherWorker) Progress: 44/100
(OtherWorker) Progress: 45/100
(OtherWorker) Progress: 46/100
(OtherWorker2) Progress: 4/100
(OtherWorker) Progress: 47/100
(OtherWorker2) Progress: 5/100
(OtherWorker2) Progress: 6/100
(OtherWorker2) Progress: 7/100
(OtherWorker2) Progress: 8/100
(OtherWorker2) Progress: 9/100
(OtherWorker2) Progress: 10/100
(OtherWorker2) Progress: 11/100
(OtherWorker2) Progress: 12/100
(OtherWorker2) Progress: 13/100
(OtherWorker2) Progress: 14/100
(OtherWorker2) Progress: 15/100
(OtherWorker2) Progress: 16/100
(OtherWorker2) Progress: 17/100
(OtherWorker2) Progress: 18/100
(OtherWorker2) Progress: 19/100
(OtherWorker2) Progress: 20/100
(OtherWorker) Progress: 48/100
(OtherWorker) Progress: 49/100
(OtherWorker) Progress: 50/100
(OtherWorker) Progress: 51/100
(OtherWorker) Progress: 52/100
(OtherWorker2) Progress: 21/100
(OtherWorker) Progress: 53/100
(OtherWorker) Progress: 54/100
(OtherWorker) Progress: 55/100
(OtherWorker2) Progress: 22/100
(OtherWorker) Progress: 56/100
(OtherWorker2) Progress: 23/100
(OtherWorker) Progress: 57/100
(OtherWorker) Progress: 58/100
(OtherWorker2) Progress: 24/100
(OtherWorker) Progress: 59/100
(OtherWorker) Progress: 60/100
(OtherWorker) Progress: 61/100
(OtherWorker) Progress: 62/100
(OtherWorker) Progress: 63/100
(OtherWorker) Progress: 64/100
(OtherWorker) Progress: 65/100
(OtherWorker2) Progress: 25/100
(OtherWorker) Progress: 66/100
(OtherWorker2) Progress: 26/100
(OtherWorker) Progress: 67/100
(OtherWorker2) Progress: 27/100
(OtherWorker2) Progress: 28/100
(OtherWorker) Progress: 68/100
(OtherWorker) Progress: 69/100
(OtherWorker) Progress: 70/100
(OtherWorker) Progress: 71/100
(OtherWorker2) Progress: 29/100
(OtherWorker2) Progress: 30/100
(OtherWorker2) Progress: 31/100
(OtherWorker2) Progress: 32/100
(OtherWorker) Progress: 72/100
(OtherWorker) Progress: 73/100
(OtherWorker) Progress: 74/100
(OtherWorker) Progress: 75/100
(OtherWorker) Progress: 76/100
(OtherWorker) Progress: 77/100
(OtherWorker) Progress: 78/100
(OtherWorker) Progress: 79/100
(OtherWorker) Progress: 80/100
(OtherWorker) Progress: 81/100
(OtherWorker) Progress: 82/100
(OtherWorker) Progress: 83/100
(OtherWorker) Progress: 84/100
(OtherWorker) Progress: 85/100
(OtherWorker) Progress: 86/100
(OtherWorker) Progress: 87/100
(OtherWorker) Progress: 88/100
(OtherWorker) Progress: 89/100
(OtherWorker) Progress: 90/100
(OtherWorker) Progress: 91/100
(OtherWorker) Progress: 92/100
(OtherWorker) Progress: 93/100
(OtherWorker) Progress: 94/100
(OtherWorker) Progress: 95/100
(OtherWorker) Progress: 96/100
(OtherWorker) Progress: 97/100
(OtherWorker) Progress: 98/100
(OtherWorker) Progress: 99/100
(OtherWorker) Progress: 100/100
(OtherWorker2) Progress: 33/100
(OtherWorker2) Progress: 34/100
(OtherWorker2) Progress: 35/100
(OtherWorker2) Progress: 36/100
(OtherWorker2) Progress: 37/100
(OtherWorker2) Progress: 38/100
(OtherWorker2) Progress: 39/100
(OtherWorker2) Progress: 40/100
(OtherWorker2) Progress: 41/100
(OtherWorker2) Progress: 42/100
(OtherWorker2) Progress: 43/100
(OtherWorker2) Progress: 44/100
(OtherWorker2) Progress: 45/100
(OtherWorker2) Progress: 46/100
(OtherWorker2) Progress: 47/100
(OtherWorker2) Progress: 48/100
(OtherWorker2) Progress: 49/100
(OtherWorker) Finished at 2024/06/17 10:28:08
(OtherWorker2) Progress: 50/100
(OtherWorker2) Progress: 51/100
(OtherWorker2) Progress: 52/100
(OtherWorker2) Progress: 53/100
(OtherWorker2) Progress: 54/100
(OtherWorker2) Progress: 55/100
(OtherWorker2) Progress: 56/100
(OtherWorker2) Progress: 57/100
(OtherWorker2) Progress: 58/100
(OtherWorker2) Progress: 59/100
(OtherWorker2) Progress: 60/100
(OtherWorker2) Progress: 61/100
(OtherWorker2) Progress: 62/100
(OtherWorker2) Progress: 63/100
(OtherWorker2) Progress: 64/100
(OtherWorker2) Progress: 65/100
(OtherWorker2) Progress: 66/100
(OtherWorker2) Progress: 67/100
(OtherWorker2) Progress: 68/100
(OtherWorker2) Progress: 69/100
(OtherWorker2) Progress: 70/100
(OtherWorker2) Progress: 71/100
(OtherWorker2) Progress: 72/100
(OtherWorker2) Progress: 73/100
(OtherWorker2) Progress: 74/100
(OtherWorker2) Progress: 75/100
(OtherWorker2) Progress: 76/100
(OtherWorker2) Progress: 77/100
(OtherWorker2) Progress: 78/100
(OtherWorker2) Progress: 79/100
(OtherWorker2) Progress: 80/100
(OtherWorker2) Progress: 81/100
(OtherWorker2) Progress: 82/100
(OtherWorker2) Progress: 83/100
(OtherWorker2) Progress: 84/100
(OtherWorker2) Progress: 85/100
(OtherWorker2) Progress: 86/100
(OtherWorker2) Progress: 87/100
(OtherWorker2) Progress: 88/100
(OtherWorker2) Progress: 89/100
(OtherWorker2) Progress: 90/100
(OtherWorker2) Progress: 91/100
(OtherWorker2) Progress: 92/100
(OtherWorker2) Progress: 93/100
(OtherWorker2) Progress: 94/100
(OtherWorker2) Progress: 95/100
(OtherWorker2) Progress: 96/100
(OtherWorker2) Progress: 97/100
(OtherWorker2) Progress: 98/100
(OtherWorker2) Progress: 99/100
(OtherWorker2) Progress: 100/100
(OtherWorker2) Finished at 2024/06/17 10:28:08
(AnotherWorker) Started at 2024/06/17 10:28:08
(AnotherWorker) Progress: 0/100
(AnotherWorker) Progress: 1/100
(AnotherWorker) Progress: 2/100
(AnotherWorker) Progress: 3/100
(AnotherWorker) Progress: 4/100
(AnotherWorker) Progress: 5/100
(AnotherWorker) Progress: 6/100
(AnotherWorker) Progress: 7/100
(AnotherWorker) Progress: 8/100
(AnotherWorker) Progress: 9/100
(AnotherWorker) Progress: 10/100
(AnotherWorker) Progress: 11/100
(AnotherWorker) Progress: 12/100
(AnotherWorker) Progress: 13/100
(AnotherWorker) Progress: 14/100
(AnotherWorker) Progress: 15/100
(AnotherWorker) Progress: 16/100
(AnotherWorker) Progress: 17/100
(AnotherWorker) Progress: 18/100
(AnotherWorker) Progress: 19/100
(AnotherWorker) Progress: 20/100
(AnotherWorker) Progress: 21/100
(AnotherWorker) Progress: 22/100
(AnotherWorker) Progress: 23/100
(AnotherWorker) Progress: 24/100
(AnotherWorker) Progress: 25/100
(AnotherWorker) Progress: 26/100
(AnotherWorker) Progress: 27/100
(AnotherWorker) Progress: 28/100
(AnotherWorker) Progress: 29/100
(AnotherWorker) Progress: 30/100
(AnotherWorker) Progress: 31/100
(AnotherWorker2) Started at 2024/06/17 10:28:08
(AnotherWorker) Progress: 32/100
(AnotherWorker) Progress: 33/100
(AnotherWorker) Progress: 34/100
(AnotherWorker) Progress: 35/100
(AnotherWorker) Progress: 36/100
(AnotherWorker) Progress: 37/100
(AnotherWorker) Progress: 38/100
(AnotherWorker) Progress: 39/100
(AnotherWorker) Progress: 40/100
(AnotherWorker) Progress: 41/100
(AnotherWorker) Progress: 42/100
(AnotherWorker) Progress: 43/100
(AnotherWorker) Progress: 44/100
(AnotherWorker) Progress: 45/100
(AnotherWorker) Progress: 46/100
(AnotherWorker) Progress: 47/100
(AnotherWorker) Progress: 48/100
(AnotherWorker) Progress: 49/100
(AnotherWorker) Progress: 50/100
(AnotherWorker) Progress: 51/100
(AnotherWorker) Progress: 52/100
(AnotherWorker) Progress: 53/100
(AnotherWorker) Progress: 54/100
(AnotherWorker) Progress: 55/100
(AnotherWorker) Progress: 56/100
(AnotherWorker) Progress: 57/100
(AnotherWorker) Progress: 58/100
(AnotherWorker) Progress: 59/100
(AnotherWorker) Progress: 60/100
(AnotherWorker) Progress: 61/100
(AnotherWorker2) Progress: 0/100
(AnotherWorker) Progress: 62/100
(AnotherWorker2) Progress: 1/100
(AnotherWorker) Progress: 63/100
(AnotherWorker2) Progress: 2/100
(AnotherWorker) Progress: 64/100
(AnotherWorker) Progress: 65/100
(AnotherWorker2) Progress: 3/100
(AnotherWorker) Progress: 66/100
(AnotherWorker2) Progress: 4/100
(AnotherWorker) Progress: 67/100
(AnotherWorker) Progress: 68/100
(AnotherWorker2) Progress: 5/100
(AnotherWorker2) Progress: 6/100
(AnotherWorker2) Progress: 7/100
(AnotherWorker2) Progress: 8/100
(AnotherWorker2) Progress: 9/100
(AnotherWorker2) Progress: 10/100
(AnotherWorker2) Progress: 11/100
(AnotherWorker2) Progress: 12/100
(AnotherWorker) Progress: 69/100
(AnotherWorker2) Progress: 13/100
(AnotherWorker) Progress: 70/100
(AnotherWorker) Progress: 71/100
(AnotherWorker) Progress: 72/100
(AnotherWorker) Progress: 73/100
(AnotherWorker2) Progress: 14/100
(AnotherWorker) Progress: 74/100
(AnotherWorker) Progress: 75/100
(AnotherWorker2) Progress: 15/100
(AnotherWorker) Progress: 76/100
(AnotherWorker) Progress: 77/100
(AnotherWorker2) Progress: 16/100
(AnotherWorker) Progress: 78/100
(AnotherWorker) Progress: 79/100
(AnotherWorker2) Progress: 17/100
(AnotherWorker) Progress: 80/100
(AnotherWorker2) Progress: 18/100
(AnotherWorker) Progress: 81/100
(AnotherWorker2) Progress: 19/100
(AnotherWorker) Progress: 82/100
(AnotherWorker2) Progress: 20/100
(AnotherWorker) Progress: 83/100
(AnotherWorker) Progress: 84/100
(AnotherWorker) Progress: 85/100
(AnotherWorker2) Progress: 21/100
(AnotherWorker) Progress: 86/100
(AnotherWorker) Progress: 87/100
(AnotherWorker2) Progress: 22/100
(AnotherWorker) Progress: 88/100
(AnotherWorker2) Progress: 23/100
(AnotherWorker) Progress: 89/100
(AnotherWorker) Progress: 90/100
(AnotherWorker) Progress: 91/100
(AnotherWorker2) Progress: 24/100
(AnotherWorker) Progress: 92/100
(AnotherWorker2) Progress: 25/100
(AnotherWorker) Progress: 93/100
(AnotherWorker) Progress: 94/100
(AnotherWorker) Progress: 95/100
(AnotherWorker) Progress: 96/100
(AnotherWorker) Progress: 97/100
(AnotherWorker2) Progress: 26/100
(AnotherWorker2) Progress: 27/100
(AnotherWorker) Progress: 98/100
(AnotherWorker2) Progress: 28/100
(AnotherWorker) Progress: 99/100
(AnotherWorker2) Progress: 29/100
(AnotherWorker) Progress: 100/100
(AnotherWorker2) Progress: 30/100
(AnotherWorker3) Started at 2024/06/17 10:28:08
(AnotherWorker3) Progress: 0/100
(AnotherWorker3) Progress: 1/100
(AnotherWorker3) Progress: 2/100
(AnotherWorker) Finished at 2024/06/17 10:28:08
(AnotherWorker3) Progress: 3/100
(AnotherWorker3) Progress: 4/100
(AnotherWorker3) Progress: 5/100
(AnotherWorker3) Progress: 6/100
(AnotherWorker2) Progress: 31/100
(AnotherWorker3) Progress: 7/100
(AnotherWorker3) Progress: 8/100
(AnotherWorker3) Progress: 9/100
(AnotherWorker3) Progress: 10/100
(AnotherWorker3) Progress: 11/100
(AnotherWorker3) Progress: 12/100
(AnotherWorker3) Progress: 13/100
(AnotherWorker3) Progress: 14/100
(AnotherWorker2) Progress: 32/100
(AnotherWorker3) Progress: 15/100
(AnotherWorker2) Progress: 33/100
(AnotherWorker2) Progress: 34/100
(AnotherWorker3) Progress: 16/100
(AnotherWorker2) Progress: 35/100
(AnotherWorker3) Progress: 17/100
(AnotherWorker2) Progress: 36/100
(AnotherWorker3) Progress: 18/100
(AnotherWorker2) Progress: 37/100
(AnotherWorker3) Progress: 19/100
(AnotherWorker3) Progress: 20/100
(AnotherWorker3) Progress: 21/100
(AnotherWorker3) Progress: 22/100
(AnotherWorker3) Progress: 23/100
(AnotherWorker3) Progress: 24/100
(AnotherWorker3) Progress: 25/100
(AnotherWorker3) Progress: 26/100
(AnotherWorker2) Progress: 38/100
(AnotherWorker3) Progress: 27/100
(AnotherWorker2) Progress: 39/100
(AnotherWorker3) Progress: 28/100
(AnotherWorker3) Progress: 29/100
(AnotherWorker2) Progress: 40/100
(AnotherWorker3) Progress: 30/100
(AnotherWorker2) Progress: 41/100
(AnotherWorker3) Progress: 31/100
(AnotherWorker3) Progress: 32/100
(AnotherWorker2) Progress: 42/100
(AnotherWorker3) Progress: 33/100
(AnotherWorker2) Progress: 43/100
(AnotherWorker3) Progress: 34/100
(AnotherWorker3) Progress: 35/100
(AnotherWorker3) Progress: 36/100
(AnotherWorker3) Progress: 37/100
(AnotherWorker3) Progress: 38/100
(AnotherWorker3) Progress: 39/100
(AnotherWorker3) Progress: 40/100
(AnotherWorker3) Progress: 41/100
(AnotherWorker3) Progress: 42/100
(AnotherWorker3) Progress: 43/100
(AnotherWorker3) Progress: 44/100
(AnotherWorker3) Progress: 45/100
(AnotherWorker3) Progress: 46/100
(AnotherWorker3) Progress: 47/100
(AnotherWorker3) Progress: 48/100
(AnotherWorker2) Progress: 44/100
(AnotherWorker3) Progress: 49/100
(AnotherWorker3) Progress: 50/100
(AnotherWorker2) Progress: 45/100
(AnotherWorker3) Progress: 51/100
(AnotherWorker3) Progress: 52/100
(AnotherWorker2) Progress: 46/100
(AnotherWorker3) Progress: 53/100
(AnotherWorker3) Progress: 54/100
(AnotherWorker2) Progress: 47/100
(AnotherWorker3) Progress: 55/100
(AnotherWorker3) Progress: 56/100
(AnotherWorker3) Progress: 57/100
(AnotherWorker3) Progress: 58/100
(AnotherWorker3) Progress: 59/100
(AnotherWorker2) Progress: 48/100
(AnotherWorker3) Progress: 60/100
(AnotherWorker3) Progress: 61/100
(AnotherWorker2) Progress: 49/100
(AnotherWorker3) Progress: 62/100
(AnotherWorker2) Progress: 50/100
(AnotherWorker3) Progress: 63/100
(AnotherWorker3) Progress: 64/100
(AnotherWorker3) Progress: 65/100
(AnotherWorker3) Progress: 66/100
(AnotherWorker3) Progress: 67/100
(AnotherWorker3) Progress: 68/100
(AnotherWorker3) Progress: 69/100
(AnotherWorker3) Progress: 70/100
(AnotherWorker2) Progress: 51/100
(AnotherWorker3) Progress: 71/100
(AnotherWorker3) Progress: 72/100
(AnotherWorker3) Progress: 73/100
(AnotherWorker2) Progress: 52/100
(AnotherWorker3) Progress: 74/100
(AnotherWorker2) Progress: 53/100
(AnotherWorker3) Progress: 75/100
(AnotherWorker3) Progress: 76/100
(AnotherWorker3) Progress: 77/100
(AnotherWorker3) Progress: 78/100
(AnotherWorker3) Progress: 79/100
(AnotherWorker3) Progress: 80/100
(AnotherWorker3) Progress: 81/100
(AnotherWorker3) Progress: 82/100
(AnotherWorker3) Progress: 83/100
(AnotherWorker2) Progress: 54/100
(AnotherWorker3) Progress: 84/100
(AnotherWorker2) Progress: 55/100
(AnotherWorker2) Progress: 56/100
(AnotherWorker2) Progress: 57/100
(AnotherWorker3) Progress: 85/100
(AnotherWorker2) Progress: 58/100
(AnotherWorker2) Progress: 59/100
(AnotherWorker3) Progress: 86/100
(AnotherWorker2) Progress: 60/100
(AnotherWorker3) Progress: 87/100
(AnotherWorker2) Progress: 61/100
(AnotherWorker3) Progress: 88/100
(AnotherWorker2) Progress: 62/100
(AnotherWorker3) Progress: 89/100
(AnotherWorker3) Progress: 90/100
(AnotherWorker2) Progress: 63/100
(AnotherWorker3) Progress: 91/100
(AnotherWorker2) Progress: 64/100
(AnotherWorker3) Progress: 92/100
(AnotherWorker2) Progress: 65/100
(AnotherWorker2) Progress: 66/100
(AnotherWorker2) Progress: 67/100
(AnotherWorker3) Progress: 93/100
(AnotherWorker3) Progress: 94/100
(AnotherWorker2) Progress: 68/100
(AnotherWorker3) Progress: 95/100
(AnotherWorker3) Progress: 96/100
(AnotherWorker3) Progress: 97/100
(AnotherWorker3) Progress: 98/100
(AnotherWorker2) Progress: 69/100
(AnotherWorker3) Progress: 99/100
(AnotherWorker3) Progress: 100/100
(AnotherWorker2) Progress: 70/100
(AnotherWorker2) Progress: 71/100
(AnotherWorker2) Progress: 72/100
(AnotherWorker2) Progress: 73/100
(AnotherWorker3) Finished at 2024/06/17 10:28:08
(AnotherWorker2) Progress: 74/100
(AnotherWorker2) Progress: 75/100
(AnotherWorker2) Progress: 76/100
(AnotherWorker2) Progress: 77/100
(AnotherWorker2) Progress: 78/100
(AnotherWorker2) Progress: 79/100
(AnotherWorker2) Progress: 80/100
(AnotherWorker2) Progress: 81/100
(AnotherWorker2) Progress: 82/100
(AnotherWorker2) Progress: 83/100
(AnotherWorker2) Progress: 84/100
(AnotherWorker2) Progress: 85/100
(AnotherWorker2) Progress: 86/100
(AnotherWorker2) Progress: 87/100
(AnotherWorker2) Progress: 88/100
(AnotherWorker2) Progress: 89/100
(AnotherWorker2) Progress: 90/100
(AnotherWorker2) Progress: 91/100
(AnotherWorker2) Progress: 92/100
(AnotherWorker2) Progress: 93/100
(AnotherWorker2) Progress: 94/100
(AnotherWorker2) Progress: 95/100
(AnotherWorker2) Progress: 96/100
(AnotherWorker2) Progress: 97/100
(AnotherWorker2) Progress: 98/100
(AnotherWorker2) Progress: 99/100
(AnotherWorker2) Progress: 100/100
(AnotherWorker2) Finished at 2024/06/17 10:28:08
(MainActivity) UploadWorker's state: ENQUEUED
(UploadWorker) Started at 2024/06/17 10:28:08
(UploadWorker) Progress: 0/100
(UploadWorker) Progress: 1/100
(UploadWorker) Progress: 2/100
(UploadWorker) Progress: 3/100
(UploadWorker) Progress: 4/100
(UploadWorker) Progress: 5/100
(UploadWorker) Progress: 6/100
(UploadWorker) Progress: 7/100
(UploadWorker) Progress: 8/100
(UploadWorker) Progress: 9/100
(UploadWorker) Progress: 10/100
(UploadWorker) Progress: 11/100
(UploadWorker) Progress: 12/100
(UploadWorker) Progress: 13/100
(UploadWorker) Progress: 14/100
(UploadWorker) Progress: 15/100
(UploadWorker) Progress: 16/100
(UploadWorker) Progress: 17/100
(UploadWorker) Progress: 18/100
(UploadWorker) Progress: 19/100
(UploadWorker) Progress: 20/100
(UploadWorker) Progress: 21/100
(UploadWorker) Progress: 22/100
(UploadWorker) Progress: 23/100
(UploadWorker) Progress: 24/100
(UploadWorker) Progress: 25/100
(UploadWorker) Progress: 26/100
(UploadWorker) Progress: 27/100
(UploadWorker) Progress: 28/100
(UploadWorker) Progress: 29/100
(UploadWorker) Progress: 30/100
(UploadWorker) Progress: 31/100
(UploadWorker) Progress: 32/100
(UploadWorker) Progress: 33/100
(UploadWorker) Progress: 34/100
(UploadWorker) Progress: 35/100
(UploadWorker) Progress: 36/100
(UploadWorker) Progress: 37/100
(UploadWorker) Progress: 38/100
(UploadWorker) Progress: 39/100
(UploadWorker) Progress: 40/100
(UploadWorker) Progress: 41/100
(UploadWorker) Progress: 42/100
(UploadWorker) Progress: 43/100
(UploadWorker) Progress: 44/100
(UploadWorker) Progress: 45/100
(UploadWorker) Progress: 46/100
(UploadWorker) Progress: 47/100
(UploadWorker) Progress: 48/100
(UploadWorker) Progress: 49/100
(UploadWorker) Progress: 50/100
(UploadWorker) Progress: 51/100
(UploadWorker) Progress: 52/100
(UploadWorker) Progress: 53/100
(UploadWorker) Progress: 54/100
(UploadWorker) Progress: 55/100
(UploadWorker) Progress: 56/100
(UploadWorker) Progress: 57/100
(UploadWorker) Progress: 58/100
(UploadWorker) Progress: 59/100
(UploadWorker) Progress: 60/100
(UploadWorker) Progress: 61/100
(UploadWorker) Progress: 62/100
(UploadWorker) Progress: 63/100
(UploadWorker) Progress: 64/100
(UploadWorker) Progress: 65/100
(UploadWorker) Progress: 66/100
(UploadWorker) Progress: 67/100
(UploadWorker) Progress: 68/100
(UploadWorker) Progress: 69/100
(UploadWorker) Progress: 70/100
(UploadWorker) Progress: 71/100
(UploadWorker) Progress: 72/100
(MainActivity) UploadWorker's state: RUNNING
(UploadWorker) Progress: 73/100
(UploadWorker) Progress: 74/100
(UploadWorker) Progress: 75/100
(UploadWorker) Progress: 76/100
(UploadWorker) Progress: 77/100
(UploadWorker) Progress: 78/100
(UploadWorker) Progress: 79/100
(UploadWorker) Progress: 80/100
(UploadWorker) Progress: 81/100
(UploadWorker) Progress: 82/100
(UploadWorker) Progress: 83/100
(UploadWorker) Progress: 84/100
(UploadWorker) Progress: 85/100
(UploadWorker) Progress: 86/100
(UploadWorker) Progress: 87/100
(UploadWorker) Progress: 88/100
(UploadWorker) Progress: 89/100
(UploadWorker) Progress: 90/100
(UploadWorker) Progress: 91/100
(UploadWorker) Progress: 92/100
(UploadWorker) Progress: 93/100
(UploadWorker) Progress: 94/100
(UploadWorker) Progress: 95/100
(UploadWorker) Progress: 96/100
(UploadWorker) Progress: 97/100
(UploadWorker) Progress: 98/100
(UploadWorker) Progress: 99/100
(UploadWorker) Progress: 100/100
(UploadWorker) Finished at 2024/06/17 10:28:08
(MainActivity) UploadWorker's state: SUCCEEDED
UploadWorker의 상태가 BLOCKED인 것을 확인할 수 있다. BLOCKED는 B 작업의 선행 작업 A가 완료되지 않아서 순서 상 A에게 종속된(= 뒤에 있는) B의 실행이 유예된 상태를 의미한다 (이 게시글의 #3 참조).
#4-2 'Periodic Request' 버튼을 클릭했을 때의 로그 메시지
(MainActivity) ChainInitiationWorker's state: ENQUEUED
(ChainInitiationWorker) Started at 2024/06/17 10:33:59
(MainActivity) ChainInitiationWorker's state: RUNNING
(ChainInitiationWorker) Finished at 2024/06/17 10:33:59
(OtherWorker) Started at 2024/06/17 10:33:59
(OtherWorker) Progress: 0/100
(OtherWorker) Progress: 1/100
(OtherWorker) Progress: 2/100
(OtherWorker) Progress: 3/100
(OtherWorker) Progress: 4/100
(OtherWorker) Progress: 5/100
(OtherWorker) Progress: 6/100
(OtherWorker) Progress: 7/100
(OtherWorker) Progress: 8/100
(OtherWorker) Progress: 9/100
(OtherWorker) Progress: 10/100
(OtherWorker) Progress: 11/100
(OtherWorker) Progress: 12/100
(OtherWorker) Progress: 13/100
(OtherWorker) Progress: 14/100
(OtherWorker) Progress: 15/100
(OtherWorker) Progress: 16/100
(OtherWorker) Progress: 17/100
(OtherWorker) Progress: 18/100
(OtherWorker) Progress: 19/100
(OtherWorker) Progress: 20/100
(OtherWorker) Progress: 21/100
(OtherWorker) Progress: 22/100
(OtherWorker) Progress: 23/100
(OtherWorker) Progress: 24/100
(OtherWorker) Progress: 25/100
(OtherWorker) Progress: 26/100
(OtherWorker) Progress: 27/100
(OtherWorker) Progress: 28/100
(OtherWorker) Progress: 29/100
(OtherWorker) Progress: 30/100
(OtherWorker) Progress: 31/100
(OtherWorker) Progress: 32/100
(OtherWorker) Progress: 33/100
(OtherWorker) Progress: 34/100
(OtherWorker) Progress: 35/100
(OtherWorker) Progress: 36/100
(OtherWorker) Progress: 37/100
(OtherWorker) Progress: 38/100
(OtherWorker) Progress: 39/100
(OtherWorker) Progress: 40/100
(OtherWorker) Progress: 41/100
(OtherWorker) Progress: 42/100
(OtherWorker) Progress: 43/100
(OtherWorker) Progress: 44/100
(OtherWorker) Progress: 45/100
(OtherWorker) Progress: 46/100
(OtherWorker) Progress: 47/100
(OtherWorker) Progress: 48/100
(OtherWorker) Progress: 49/100
(OtherWorker) Progress: 50/100
(OtherWorker) Progress: 51/100
(OtherWorker) Progress: 52/100
(OtherWorker) Progress: 53/100
(OtherWorker) Progress: 54/100
(OtherWorker) Progress: 55/100
(OtherWorker) Progress: 56/100
(OtherWorker) Progress: 57/100
(OtherWorker) Progress: 58/100
(OtherWorker) Progress: 59/100
(OtherWorker) Progress: 60/100
(OtherWorker) Progress: 61/100
(OtherWorker) Progress: 62/100
(OtherWorker) Progress: 63/100
(OtherWorker) Progress: 64/100
(OtherWorker) Progress: 65/100
(OtherWorker) Progress: 66/100
(OtherWorker) Progress: 67/100
(OtherWorker) Progress: 68/100
(OtherWorker) Progress: 69/100
(OtherWorker) Progress: 70/100
(OtherWorker) Progress: 71/100
(OtherWorker) Progress: 72/100
(OtherWorker) Progress: 73/100
(OtherWorker) Progress: 74/100
(OtherWorker) Progress: 75/100
(OtherWorker) Progress: 76/100
(OtherWorker) Progress: 77/100
(OtherWorker) Progress: 78/100
(OtherWorker) Progress: 79/100
(OtherWorker) Progress: 80/100
(OtherWorker) Progress: 81/100
(OtherWorker) Progress: 82/100
(OtherWorker) Progress: 83/100
(OtherWorker) Progress: 84/100
(OtherWorker) Progress: 85/100
(OtherWorker) Progress: 86/100
(OtherWorker) Progress: 87/100
(OtherWorker) Progress: 88/100
(OtherWorker) Progress: 89/100
(OtherWorker) Progress: 90/100
(OtherWorker) Progress: 91/100
(OtherWorker) Progress: 92/100
(OtherWorker) Progress: 93/100
(OtherWorker) Progress: 94/100
(OtherWorker) Progress: 95/100
(OtherWorker) Progress: 96/100
(OtherWorker) Progress: 97/100
(OtherWorker) Progress: 98/100
(OtherWorker) Progress: 99/100
(OtherWorker) Progress: 100/100
(OtherWorker) Finished at 2024/06/17 10:33:59
(MainActivity) ChainInitiationWorker's state: ENQUEUED
(OtherWorker2) Started at 2024/06/17 10:33:59
(OtherWorker2) Progress: 0/100
(OtherWorker2) Progress: 1/100
(OtherWorker2) Progress: 2/100
(OtherWorker2) Progress: 3/100
(OtherWorker2) Progress: 4/100
(OtherWorker2) Progress: 5/100
(OtherWorker2) Progress: 6/100
(OtherWorker2) Progress: 7/100
(OtherWorker2) Progress: 8/100
(OtherWorker2) Progress: 9/100
(OtherWorker2) Progress: 10/100
(OtherWorker2) Progress: 11/100
(OtherWorker2) Progress: 12/100
(OtherWorker2) Progress: 13/100
(OtherWorker2) Progress: 14/100
(OtherWorker2) Progress: 15/100
(OtherWorker2) Progress: 16/100
(OtherWorker2) Progress: 17/100
(OtherWorker2) Progress: 18/100
(OtherWorker2) Progress: 19/100
(OtherWorker2) Progress: 20/100
(OtherWorker2) Progress: 21/100
(OtherWorker2) Progress: 22/100
(OtherWorker2) Progress: 23/100
(OtherWorker2) Progress: 24/100
(OtherWorker2) Progress: 25/100
(OtherWorker2) Progress: 26/100
(OtherWorker2) Progress: 27/100
(OtherWorker2) Progress: 28/100
(OtherWorker2) Progress: 29/100
(OtherWorker2) Progress: 30/100
(OtherWorker2) Progress: 31/100
(OtherWorker2) Progress: 32/100
(OtherWorker2) Progress: 33/100
(OtherWorker2) Progress: 34/100
(OtherWorker2) Progress: 35/100
(OtherWorker2) Progress: 36/100
(OtherWorker2) Progress: 37/100
(OtherWorker2) Progress: 38/100
(OtherWorker2) Progress: 39/100
(OtherWorker2) Progress: 40/100
(OtherWorker2) Progress: 41/100
(OtherWorker2) Progress: 42/100
(OtherWorker2) Progress: 43/100
(OtherWorker2) Progress: 44/100
(OtherWorker2) Progress: 45/100
(OtherWorker2) Progress: 46/100
(OtherWorker2) Progress: 47/100
(OtherWorker2) Progress: 48/100
(OtherWorker2) Progress: 49/100
(OtherWorker2) Progress: 50/100
(OtherWorker2) Progress: 51/100
(OtherWorker2) Progress: 52/100
(OtherWorker2) Progress: 53/100
(OtherWorker2) Progress: 54/100
(OtherWorker2) Progress: 55/100
(OtherWorker2) Progress: 56/100
(OtherWorker2) Progress: 57/100
(OtherWorker2) Progress: 58/100
(OtherWorker2) Progress: 59/100
(OtherWorker2) Progress: 60/100
(OtherWorker2) Progress: 61/100
(OtherWorker2) Progress: 62/100
(OtherWorker2) Progress: 63/100
(OtherWorker2) Progress: 64/100
(OtherWorker2) Progress: 65/100
(OtherWorker2) Progress: 66/100
(OtherWorker2) Progress: 67/100
(OtherWorker2) Progress: 68/100
(OtherWorker2) Progress: 69/100
(OtherWorker2) Progress: 70/100
(OtherWorker2) Progress: 71/100
(OtherWorker2) Progress: 72/100
(OtherWorker2) Progress: 73/100
(OtherWorker2) Progress: 74/100
(OtherWorker2) Progress: 75/100
(OtherWorker2) Progress: 76/100
(OtherWorker2) Progress: 77/100
(OtherWorker2) Progress: 78/100
(OtherWorker2) Progress: 79/100
(OtherWorker2) Progress: 80/100
(OtherWorker2) Progress: 81/100
(OtherWorker2) Progress: 82/100
(OtherWorker2) Progress: 83/100
(OtherWorker2) Progress: 84/100
(OtherWorker2) Progress: 85/100
(OtherWorker2) Progress: 86/100
(OtherWorker2) Progress: 87/100
(OtherWorker2) Progress: 88/100
(OtherWorker2) Progress: 89/100
(OtherWorker2) Progress: 90/100
(OtherWorker2) Progress: 91/100
(OtherWorker2) Progress: 92/100
(OtherWorker2) Progress: 93/100
(OtherWorker2) Progress: 94/100
(OtherWorker2) Progress: 95/100
(OtherWorker2) Progress: 96/100
(OtherWorker2) Progress: 97/100
(OtherWorker2) Progress: 98/100
(OtherWorker2) Progress: 99/100
(OtherWorker2) Progress: 100/100
(OtherWorker2) Finished at 2024/06/17 10:33:59
(AnotherWorker) Started at 2024/06/17 10:33:59
(AnotherWorker) Progress: 0/100
(AnotherWorker) Progress: 1/100
(AnotherWorker) Progress: 2/100
(AnotherWorker) Progress: 3/100
(AnotherWorker) Progress: 4/100
(AnotherWorker) Progress: 5/100
(AnotherWorker) Progress: 6/100
(AnotherWorker) Progress: 7/100
(AnotherWorker) Progress: 8/100
(AnotherWorker) Progress: 9/100
(AnotherWorker) Progress: 10/100
(AnotherWorker) Progress: 11/100
(AnotherWorker) Progress: 12/100
(AnotherWorker) Progress: 13/100
(AnotherWorker) Progress: 14/100
(AnotherWorker) Progress: 15/100
(AnotherWorker) Progress: 16/100
(AnotherWorker) Progress: 17/100
(AnotherWorker) Progress: 18/100
(AnotherWorker) Progress: 19/100
(AnotherWorker) Progress: 20/100
(AnotherWorker) Progress: 21/100
(AnotherWorker) Progress: 22/100
(AnotherWorker) Progress: 23/100
(AnotherWorker) Progress: 24/100
(AnotherWorker) Progress: 25/100
(AnotherWorker) Progress: 26/100
(AnotherWorker) Progress: 27/100
(AnotherWorker) Progress: 28/100
(AnotherWorker) Progress: 29/100
(AnotherWorker) Progress: 30/100
(AnotherWorker) Progress: 31/100
(AnotherWorker) Progress: 32/100
(AnotherWorker) Progress: 33/100
(AnotherWorker) Progress: 34/100
(AnotherWorker) Progress: 35/100
(AnotherWorker) Progress: 36/100
(AnotherWorker) Progress: 37/100
(AnotherWorker) Progress: 38/100
(AnotherWorker) Progress: 39/100
(AnotherWorker) Progress: 40/100
(AnotherWorker2) Started at 2024/06/17 10:33:59
(AnotherWorker) Progress: 41/100
(AnotherWorker) Progress: 42/100
(AnotherWorker) Progress: 43/100
(AnotherWorker) Progress: 44/100
(AnotherWorker) Progress: 45/100
(AnotherWorker) Progress: 46/100
(AnotherWorker) Progress: 47/100
(AnotherWorker) Progress: 48/100
(AnotherWorker) Progress: 49/100
(AnotherWorker) Progress: 50/100
(AnotherWorker) Progress: 51/100
(AnotherWorker) Progress: 52/100
(AnotherWorker) Progress: 53/100
(AnotherWorker) Progress: 54/100
(AnotherWorker) Progress: 55/100
(AnotherWorker) Progress: 56/100
(AnotherWorker) Progress: 57/100
(AnotherWorker) Progress: 58/100
(AnotherWorker2) Progress: 0/100
(AnotherWorker) Progress: 59/100
(AnotherWorker) Progress: 60/100
(AnotherWorker) Progress: 61/100
(AnotherWorker) Progress: 62/100
(AnotherWorker) Progress: 63/100
(AnotherWorker) Progress: 64/100
(AnotherWorker) Progress: 65/100
(AnotherWorker) Progress: 66/100
(AnotherWorker) Progress: 67/100
(AnotherWorker) Progress: 68/100
(AnotherWorker) Progress: 69/100
(AnotherWorker) Progress: 70/100
(AnotherWorker) Progress: 71/100
(AnotherWorker2) Progress: 1/100
(AnotherWorker) Progress: 72/100
(AnotherWorker) Progress: 73/100
(AnotherWorker) Progress: 74/100
(AnotherWorker) Progress: 75/100
(AnotherWorker) Progress: 76/100
(AnotherWorker2) Progress: 2/100
(AnotherWorker) Progress: 77/100
(AnotherWorker2) Progress: 3/100
(AnotherWorker) Progress: 78/100
(AnotherWorker) Progress: 79/100
(AnotherWorker) Progress: 80/100
(AnotherWorker) Progress: 81/100
(AnotherWorker) Progress: 82/100
(AnotherWorker2) Progress: 4/100
(AnotherWorker2) Progress: 5/100
(AnotherWorker2) Progress: 6/100
(AnotherWorker2) Progress: 7/100
(AnotherWorker2) Progress: 8/100
(AnotherWorker2) Progress: 9/100
(AnotherWorker2) Progress: 10/100
(AnotherWorker) Progress: 83/100
(AnotherWorker) Progress: 84/100
(AnotherWorker2) Progress: 11/100
(AnotherWorker2) Progress: 12/100
(AnotherWorker) Progress: 85/100
(AnotherWorker2) Progress: 13/100
(AnotherWorker2) Progress: 14/100
(AnotherWorker2) Progress: 15/100
(AnotherWorker) Progress: 86/100
(AnotherWorker2) Progress: 16/100
(AnotherWorker) Progress: 87/100
(AnotherWorker2) Progress: 17/100
(AnotherWorker) Progress: 88/100
(AnotherWorker) Progress: 89/100
(AnotherWorker) Progress: 90/100
(AnotherWorker) Progress: 91/100
(AnotherWorker) Progress: 92/100
(AnotherWorker) Progress: 93/100
(AnotherWorker) Progress: 94/100
(AnotherWorker2) Progress: 18/100
(AnotherWorker) Progress: 95/100
(AnotherWorker2) Progress: 19/100
(AnotherWorker) Progress: 96/100
(AnotherWorker2) Progress: 20/100
(AnotherWorker) Progress: 97/100
(AnotherWorker2) Progress: 21/100
(AnotherWorker2) Progress: 22/100
(AnotherWorker2) Progress: 23/100
(AnotherWorker) Progress: 98/100
(AnotherWorker2) Progress: 24/100
(AnotherWorker) Progress: 99/100
(AnotherWorker) Progress: 100/100
(AnotherWorker2) Progress: 25/100
(AnotherWorker2) Progress: 26/100
(AnotherWorker2) Progress: 27/100
(AnotherWorker2) Progress: 28/100
(AnotherWorker2) Progress: 29/100
(AnotherWorker2) Progress: 30/100
(AnotherWorker2) Progress: 31/100
(AnotherWorker2) Progress: 32/100
(AnotherWorker2) Progress: 33/100
(AnotherWorker2) Progress: 34/100
(AnotherWorker2) Progress: 35/100
(AnotherWorker2) Progress: 36/100
(AnotherWorker2) Progress: 37/100
(AnotherWorker2) Progress: 38/100
(AnotherWorker2) Progress: 39/100
(AnotherWorker2) Progress: 40/100
(AnotherWorker2) Progress: 41/100
(AnotherWorker2) Progress: 42/100
(AnotherWorker2) Progress: 43/100
(AnotherWorker) Finished at 2024/06/17 10:33:59
(AnotherWorker2) Progress: 44/100
(AnotherWorker3) Started at 2024/06/17 10:33:59
(AnotherWorker3) Progress: 0/100
(AnotherWorker2) Progress: 45/100
(AnotherWorker3) Progress: 1/100
(AnotherWorker2) Progress: 46/100
(AnotherWorker2) Progress: 47/100
(AnotherWorker2) Progress: 48/100
(AnotherWorker3) Progress: 2/100
(AnotherWorker2) Progress: 49/100
(AnotherWorker3) Progress: 3/100
(AnotherWorker3) Progress: 4/100
(AnotherWorker2) Progress: 50/100
(AnotherWorker3) Progress: 5/100
(AnotherWorker2) Progress: 51/100
(AnotherWorker2) Progress: 52/100
(AnotherWorker3) Progress: 6/100
(AnotherWorker3) Progress: 7/100
(AnotherWorker3) Progress: 8/100
(AnotherWorker3) Progress: 9/100
(AnotherWorker2) Progress: 53/100
(AnotherWorker3) Progress: 10/100
(AnotherWorker2) Progress: 54/100
(AnotherWorker3) Progress: 11/100
(AnotherWorker2) Progress: 55/100
(AnotherWorker3) Progress: 12/100
(AnotherWorker3) Progress: 13/100
(AnotherWorker2) Progress: 56/100
(AnotherWorker3) Progress: 14/100
(AnotherWorker3) Progress: 15/100
(AnotherWorker2) Progress: 57/100
(AnotherWorker3) Progress: 16/100
(AnotherWorker2) Progress: 58/100
(AnotherWorker3) Progress: 17/100
(AnotherWorker2) Progress: 59/100
(AnotherWorker3) Progress: 18/100
(AnotherWorker2) Progress: 60/100
(AnotherWorker2) Progress: 61/100
(AnotherWorker3) Progress: 19/100
(AnotherWorker3) Progress: 20/100
(AnotherWorker2) Progress: 62/100
(AnotherWorker3) Progress: 21/100
(AnotherWorker3) Progress: 22/100
(AnotherWorker3) Progress: 23/100
(AnotherWorker3) Progress: 24/100
(AnotherWorker3) Progress: 25/100
(AnotherWorker2) Progress: 63/100
(AnotherWorker3) Progress: 26/100
(AnotherWorker2) Progress: 64/100
(AnotherWorker2) Progress: 65/100
(AnotherWorker3) Progress: 27/100
(AnotherWorker3) Progress: 28/100
(AnotherWorker3) Progress: 29/100
(AnotherWorker3) Progress: 30/100
(AnotherWorker3) Progress: 31/100
(AnotherWorker3) Progress: 32/100
(AnotherWorker3) Progress: 33/100
(AnotherWorker2) Progress: 66/100
(AnotherWorker2) Progress: 67/100
(AnotherWorker2) Progress: 68/100
(AnotherWorker3) Progress: 34/100
(AnotherWorker2) Progress: 69/100
(AnotherWorker2) Progress: 70/100
(AnotherWorker3) Progress: 35/100
(AnotherWorker2) Progress: 71/100
(AnotherWorker3) Progress: 36/100
(AnotherWorker2) Progress: 72/100
(AnotherWorker2) Progress: 73/100
(AnotherWorker2) Progress: 74/100
(AnotherWorker2) Progress: 75/100
(AnotherWorker2) Progress: 76/100
(AnotherWorker2) Progress: 77/100
(AnotherWorker3) Progress: 37/100
(AnotherWorker3) Progress: 38/100
(AnotherWorker3) Progress: 39/100
(AnotherWorker2) Progress: 78/100
(AnotherWorker2) Progress: 79/100
(AnotherWorker3) Progress: 40/100
(AnotherWorker2) Progress: 80/100
(AnotherWorker2) Progress: 81/100
(AnotherWorker2) Progress: 82/100
(AnotherWorker3) Progress: 41/100
(AnotherWorker2) Progress: 83/100
(AnotherWorker3) Progress: 42/100
(AnotherWorker2) Progress: 84/100
(AnotherWorker2) Progress: 85/100
(AnotherWorker2) Progress: 86/100
(AnotherWorker2) Progress: 87/100
(AnotherWorker2) Progress: 88/100
(AnotherWorker2) Progress: 89/100
(AnotherWorker2) Progress: 90/100
(AnotherWorker2) Progress: 91/100
(AnotherWorker2) Progress: 92/100
(AnotherWorker2) Progress: 93/100
(AnotherWorker3) Progress: 43/100
(AnotherWorker2) Progress: 94/100
(AnotherWorker2) Progress: 95/100
(AnotherWorker2) Progress: 96/100
(AnotherWorker2) Progress: 97/100
(AnotherWorker2) Progress: 98/100
(AnotherWorker2) Progress: 99/100
(AnotherWorker2) Progress: 100/100
(AnotherWorker3) Progress: 44/100
(AnotherWorker3) Progress: 45/100
(AnotherWorker3) Progress: 46/100
(AnotherWorker3) Progress: 47/100
(AnotherWorker3) Progress: 48/100
(AnotherWorker3) Progress: 49/100
(AnotherWorker2) Finished at 2024/06/17 10:33:59
(AnotherWorker3) Progress: 50/100
(AnotherWorker3) Progress: 51/100
(AnotherWorker3) Progress: 52/100
(AnotherWorker3) Progress: 53/100
(AnotherWorker3) Progress: 54/100
(AnotherWorker3) Progress: 55/100
(AnotherWorker3) Progress: 56/100
(AnotherWorker3) Progress: 57/100
(AnotherWorker3) Progress: 58/100
(AnotherWorker3) Progress: 59/100
(AnotherWorker3) Progress: 60/100
(AnotherWorker3) Progress: 61/100
(AnotherWorker3) Progress: 62/100
(AnotherWorker3) Progress: 63/100
(AnotherWorker3) Progress: 64/100
(AnotherWorker3) Progress: 65/100
(AnotherWorker3) Progress: 66/100
(AnotherWorker3) Progress: 67/100
(AnotherWorker3) Progress: 68/100
(AnotherWorker3) Progress: 69/100
(AnotherWorker3) Progress: 70/100
(AnotherWorker3) Progress: 71/100
(AnotherWorker3) Progress: 72/100
(AnotherWorker3) Progress: 73/100
(AnotherWorker3) Progress: 74/100
(AnotherWorker3) Progress: 75/100
(AnotherWorker3) Progress: 76/100
(AnotherWorker3) Progress: 77/100
(AnotherWorker3) Progress: 78/100
(AnotherWorker3) Progress: 79/100
(AnotherWorker3) Progress: 80/100
(AnotherWorker3) Progress: 81/100
(AnotherWorker3) Progress: 82/100
(AnotherWorker3) Progress: 83/100
(AnotherWorker3) Progress: 84/100
(AnotherWorker3) Progress: 85/100
(AnotherWorker3) Progress: 86/100
(AnotherWorker3) Progress: 87/100
(AnotherWorker3) Progress: 88/100
(AnotherWorker3) Progress: 89/100
(AnotherWorker3) Progress: 90/100
(AnotherWorker3) Progress: 91/100
(AnotherWorker3) Progress: 92/100
(AnotherWorker3) Progress: 93/100
(AnotherWorker3) Progress: 94/100
(AnotherWorker3) Progress: 95/100
(AnotherWorker3) Progress: 96/100
(AnotherWorker3) Progress: 97/100
(AnotherWorker3) Progress: 98/100
(AnotherWorker3) Progress: 99/100
(AnotherWorker3) Progress: 100/100
(AnotherWorker3) Finished at 2024/06/17 10:34:00
(DownloadWorker) Started at 2024/06/17 10:34:00
(DownloadWorker) Progress: 0/100
(DownloadWorker) Progress: 1/100
(DownloadWorker) Progress: 2/100
(DownloadWorker) Progress: 3/100
(DownloadWorker) Progress: 4/100
(DownloadWorker) Progress: 5/100
(DownloadWorker) Progress: 6/100
(DownloadWorker) Progress: 7/100
(DownloadWorker) Progress: 8/100
(DownloadWorker) Progress: 9/100
(DownloadWorker) Progress: 10/100
(DownloadWorker) Progress: 11/100
(DownloadWorker) Progress: 12/100
(DownloadWorker) Progress: 13/100
(DownloadWorker) Progress: 14/100
(DownloadWorker) Progress: 15/100
(DownloadWorker) Progress: 16/100
(DownloadWorker) Progress: 17/100
(DownloadWorker) Progress: 18/100
(DownloadWorker) Progress: 19/100
(DownloadWorker) Progress: 20/100
(DownloadWorker) Progress: 21/100
(DownloadWorker) Progress: 22/100
(DownloadWorker) Progress: 23/100
(DownloadWorker) Progress: 24/100
(DownloadWorker) Progress: 25/100
(DownloadWorker) Progress: 26/100
(DownloadWorker) Progress: 27/100
(DownloadWorker) Progress: 28/100
(DownloadWorker) Progress: 29/100
(DownloadWorker) Progress: 30/100
(DownloadWorker) Progress: 31/100
(DownloadWorker) Progress: 32/100
(DownloadWorker) Progress: 33/100
(DownloadWorker) Progress: 34/100
(DownloadWorker) Progress: 35/100
(DownloadWorker) Progress: 36/100
(DownloadWorker) Progress: 37/100
(DownloadWorker) Progress: 38/100
(DownloadWorker) Progress: 39/100
(DownloadWorker) Progress: 40/100
(DownloadWorker) Progress: 41/100
(DownloadWorker) Progress: 42/100
(DownloadWorker) Progress: 43/100
(DownloadWorker) Progress: 44/100
(DownloadWorker) Progress: 45/100
(DownloadWorker) Progress: 46/100
(DownloadWorker) Progress: 47/100
(DownloadWorker) Progress: 48/100
(DownloadWorker) Progress: 49/100
(DownloadWorker) Progress: 50/100
(DownloadWorker) Progress: 51/100
(DownloadWorker) Progress: 52/100
(DownloadWorker) Progress: 53/100
(DownloadWorker) Progress: 54/100
(DownloadWorker) Progress: 55/100
(DownloadWorker) Progress: 56/100
(DownloadWorker) Progress: 57/100
(DownloadWorker) Progress: 58/100
(DownloadWorker) Progress: 59/100
(DownloadWorker) Progress: 60/100
(DownloadWorker) Progress: 61/100
(DownloadWorker) Progress: 62/100
(DownloadWorker) Progress: 63/100
(DownloadWorker) Progress: 64/100
(DownloadWorker) Progress: 65/100
(DownloadWorker) Progress: 66/100
(DownloadWorker) Progress: 67/100
(DownloadWorker) Progress: 68/100
(DownloadWorker) Progress: 69/100
(DownloadWorker) Progress: 70/100
(DownloadWorker) Progress: 71/100
(DownloadWorker) Progress: 72/100
(DownloadWorker) Progress: 73/100
(DownloadWorker) Progress: 74/100
(DownloadWorker) Progress: 75/100
(DownloadWorker) Progress: 76/100
(DownloadWorker) Progress: 77/100
(DownloadWorker) Progress: 78/100
(DownloadWorker) Progress: 79/100
(DownloadWorker) Progress: 80/100
(DownloadWorker) Progress: 81/100
(DownloadWorker) Progress: 82/100
(DownloadWorker) Progress: 83/100
(DownloadWorker) Progress: 84/100
(DownloadWorker) Progress: 85/100
(DownloadWorker) Progress: 86/100
(DownloadWorker) Progress: 87/100
(DownloadWorker) Progress: 88/100
(DownloadWorker) Progress: 89/100
(DownloadWorker) Progress: 90/100
(DownloadWorker) Progress: 91/100
(DownloadWorker) Progress: 92/100
(DownloadWorker) Progress: 93/100
(DownloadWorker) Progress: 94/100
(DownloadWorker) Progress: 95/100
(DownloadWorker) Progress: 96/100
(DownloadWorker) Progress: 97/100
(DownloadWorker) Progress: 98/100
(DownloadWorker) Progress: 99/100
(DownloadWorker) Progress: 100/100
(DownloadWorker) Finished at 2024/06/17 10:34:00
이하 생략
ChainInitiationWorker가 RUNNING 상태 후 굉장히 빨리 ENQUEUED로 전환(위 코드에서 108번째 줄)되었는데, 이는 ChainInitiationWorker의 스레드와 다른 별도의 스레드에서 ChainInitiationWorker 내부의 WorkRequest가 진행되었기 때문으로 보인다.
#5 요약
Worker의 Chaining을 병렬로 구성함으로써, 코드의 유연성을 극대화한다.
#6 완성된 앱
'깨알 개념 > Android' 카테고리의 다른 글
[Android] Dagger2 - @Provides (0) | 2024.06.24 |
---|---|
[Android] Dagger2 - 기초 (0) | 2024.06.24 |
[Android] WorkManager - 작업 연쇄하기(Chaining) (0) | 2024.06.17 |
[Android] WorkManager - 제약 조건 (Constraints) (0) | 2024.06.17 |
[Android] WorkManager - 인자 전달 및 데이터 반환 (0) | 2024.06.17 |