JobScheduler 디버그 문서를 찾을 수있는 위치

Nov 13 2020

디버그에서 다음 데이터가 있습니다.

 JOB #u0a231/5: a2826a0 com.abc.workmanagertest/androidx.work.impl.background.systemjob.SystemJobService
    u0a231 tag=*job*/com.abc.workmanagertest/androidx.work.impl.background.systemjob.SystemJobService
    Source: uid=u0a231 user=0 pkg=com.abc.workmanagertest
    JobInfo:
      Service: com.abc.workmanagertest/androidx.work.impl.background.systemjob.SystemJobService
      Flags: 2
      Requires: charging=false batteryNotLow=false deviceIdle=false
      Trigger content URIs:
        1 content://media/internal/video/media
        1 content://media/external/video/media
        1 content://media/internal/images/media
        1 content://media/external/images/media
      Trigger update delay: +1m0s0ms
      Trigger max delay: +10m0s0ms
      Extras: mParcelledData.dataSize=180
      Network type: NetworkRequest [ NONE id=0, [ Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&VALIDATED Uid: 10231 AdministratorUids: [] RequestorUid: -1 RequestorPackageName: null] ]
      Backoff: policy=1 initial=+30s0ms
    Required constraints: CONNECTIVITY CONTENT_TRIGGER [0x14000000]
    Dynamic constraints:
    Satisfied constraints: CONNECTIVITY CONTENT_TRIGGER DEVICE_NOT_DOZING BACKGROUND_NOT_RESTRICTED [0x16400000]
    Unsatisfied constraints: WITHIN_QUOTA [0x1000000]
    Tracking: CONNECTIVITY CONTENT QUOTA
    Implicit constraints:
      readyNotDozing: true
      readyNotRestrictedInBg: true
      readyDynamicSatisfied: false
    Network: 103
    Standby bucket: RARE
      Deferred since: -1h4m36s59ms
    Enqueue time: -1h4m36s59ms
    Run time: earliest=none, latest=none, original latest=none
    Restricted due to: none.
    Ready: false (job=false user=true !restricted=true !pending=true !active=true !backingup=true comp=true) 

실행되지 않는 작업에 대한 문제는 다음과 같습니다. 충족 되지 않은 제약 조건 : WITHIN_QUOTA

이것이 의미하는 바에 대한 설명이있는 문서가 없습니까?

다음 게시물을 보았지만 의견 일뿐입니다.

잠시 후 고유 한 주기적 작업 중지 실행

답변

1 Wonil Nov 14 2020 at 16:38

setRequiresCharging 과 같이 Job에 대한 제약 조건을 지정할 수 있습니다 . 제약 조건이 충족되지 않으면 Job을 onStopJob 으로 중지 할 수 있습니다 . 예를 들어 덤프의 작업에는 CONNECTIVITY CONTENT_TRIGGER제약 조건이 필요 합니다.

Unsatisfied constraints: WITHIN_QUOTA이 작업에 대해 충족되지 않은 WITHIN_QUOTA 암시 적 제약 조건을 보여줍니다 . 할당량없이 작업을 실행할 수 없습니다. WITHIN_QUOTA암시 적 제약 (명시 적 제약 설정없이 추가됨, 이 코드 참조 )입니다.

자세한 내용은 PTAL QuotaController 문서 에서 대기 버킷 할당량 과 관련이 있습니다.