android-priority-jobqueue icon indicating copy to clipboard operation
android-priority-jobqueue copied to clipboard

Job not running

Open d3bt3ch opened this issue 6 years ago • 2 comments

A strange problem started only recently. One of the jobs in the app is geting added but not running.

`public class TestJob extends Job {

private static final String TAG = "TestJob";

/**
 * ctor
 */
public TestJob() {
    super(new Params(JobPriority.NORMAL).persist());
}

@Override
public void onAdded() {
    Log.d(TAG, "Job added");
}

@Override
public void onRun() throws Throwable {
    Log.d(TAG, "Job running");
}

@Override
protected void onCancel(int cancelReason, @Nullable Throwable throwable) {
    Log.d(TAG, "Job cancelled");
}

@Override
protected RetryConstraint shouldReRunOnThrowable(@NonNull Throwable throwable, int runCount, int maxRunCount) {
    return RetryConstraint.createExponentialBackoff(runCount, 1000);
}

}`

d3bt3ch avatar May 18 '18 15:05 d3bt3ch

Surprising. If I dont make the job persistent then it works.

[EDIT] Its not working again.

d3bt3ch avatar May 18 '18 15:05 d3bt3ch

@debjitk Do you get callback on onAdded function?

kalpeshp0310 avatar May 21 '18 18:05 kalpeshp0310