{"action":"created","issue":{"url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/3","labels_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/3/comments","events_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/3/events","html_url":"https://github.com/yigit/android-priority-jobqueue/issues/3","id":60217427,"number":3,"title":"Unwanted duplication of jobs in a queue","user":{"login":"yigit","id":89202,"avatar_url":"https://avatars.githubusercontent.com/u/89202?v=3","gravatar_id":"","url":"https://api.github.com/users/yigit","html_url":"https://github.com/yigit","followers_url":"https://api.github.com/users/yigit/followers","following_url":"https://api.github.com/users/yigit/following{/other_user}","gists_url":"https://api.github.com/users/yigit/gists{/gist_id}","starred_url":"https://api.github.com/users/yigit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yigit/subscriptions","organizations_url":"https://api.github.com/users/yigit/orgs","repos_url":"https://api.github.com/users/yigit/repos","events_url":"https://api.github.com/users/yigit/events{/privacy}","received_events_url":"https://api.github.com/users/yigit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-03-07T18:11:29Z","updated_at":"2015-11-27T07:55:00Z","closed_at":null,"body":"_From @ckozak on February 7, 2015 0:36_\n\nI have a following scenario in which I consistently get duplication of jobs.\r\n\r\n```java\r\nConfiguration configuration = new Configuration.Builder(getContext())\r\n                .minConsumerCount(1) //always keep at least one consumer alive\r\n                .maxConsumerCount(1) //up to 3 consumers at a time\r\n                .loadFactor(1) //3 jobs per consumer\r\n                .consumerKeepAlive(120) //wait 2 minute\r\n                .build();\r\n```\r\nI'm trying to get sequential jobs execution. Parallelization is not that important to me.\r\n\r\n- Execute a job with a network call (with .requireNetwork().persist()).\r\n- It fails with an AuthException. At this point I call jobManaber.stop() because  any subsequent job execution will fail with the same AuthException and I need to re-login.\r\n\r\n```java\r\n@Override\r\n    protected void onCancel() {\r\n\r\n    }\r\n\r\n    @Override\r\n    protected boolean shouldReRunOnThrowable(Throwable throwable) {\r\n        return throwable instanceof AuthException;\r\n    }\r\n```\r\n\r\n- When I relogin I call jobManager.start() to continue jobs execution.\r\n- I consistently get 2-3 duplicated jobs at this point.\n\n_Copied from original issue: path/android-priority-jobqueue#92_"},"comment":{"url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/comments/160062378","html_url":"https://github.com/yigit/android-priority-jobqueue/issues/3#issuecomment-160062378","issue_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/3","id":160062378,"user":{"login":"yigit","id":89202,"avatar_url":"https://avatars.githubusercontent.com/u/89202?v=3","gravatar_id":"","url":"https://api.github.com/users/yigit","html_url":"https://github.com/yigit","followers_url":"https://api.github.com/users/yigit/followers","following_url":"https://api.github.com/users/yigit/following{/other_user}","gists_url":"https://api.github.com/users/yigit/gists{/gist_id}","starred_url":"https://api.github.com/users/yigit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yigit/subscriptions","organizations_url":"https://api.github.com/users/yigit/orgs","repos_url":"https://api.github.com/users/yigit/repos","events_url":"https://api.github.com/users/yigit/events{/privacy}","received_events_url":"https://api.github.com/users/yigit/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T07:55:00Z","updated_at":"2015-11-27T07:55:00Z","body":"@tuliohmendes I cannot reproduce this so if you have a sample app that I can look at, that would be great."}}