New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persisted jobs are not removed anymore in v5.0.1 #367
Comments
This is true. Persisted Jobs are not being removed. I had to manually adjust it on my own fork :( |
@arthurdapaz Can you share your fork or open an MR ? How did you solve the issue ? |
@lucas34 I'm actually investigating the issue right now. I didn't push it yet. It seems like it happens on very specific situation. For example: If my job is constrained to internet access... (so it is persisted)... I close the app (and then we have internet again, the job will be looping every time the manager is initialized) |
Ok @lucas34 , I have fixed the issue now. :) After deep investigation, the problem is that the generic functions (getConstraint) aren't able to retrieve the persisterConstraint from job.info. On debug I noticed that inside "job" we can recover the persisterConstraint, but inside job.info the persisterConstraint is not added at all |
Created a merge request here: #369 |
@arthurdapaz Awesome thanks, I have merged your MR, I'm preparing a 5.0.2 release |
This issue can be closed now. Since 5.0.2 its already released! Thank you, sir! |
Hi, I confirm that solves my bug, thanks @arthurdapaz for having fixed it. |
Hi @lucas34,
I have just tested v5.0.1 and I'm sorry but relative bug is still present... Persisted jobs are not removed from "persistence" if app has been killed before. There are still restored again and again... 馃槙
App launch logs with SwiftQueue v5.0.1: 1 print of insert in queue, 1 print of restore in queue for persisted jobs and only one print of remove from queue for StopRideJob which is the only one not persisted. Persisted jobs are restored, still not inserted and not removed
16:03:59.344 馃挏 VERBOSE LRJobPersister.init():17 - create a LR job persister v5
16:03:59.344 馃挏 VERBOSE LRJobPersister.restore():26 - restore
16:03:59.345 馃挏 VERBOSE LRJobPersister.restore():34 - restore in queue
16:03:59.347 馃挌 DEBUG AutoRenameRideJob.init():64 - create a job to auto rename ride 3
16:03:59.350 馃挌 DEBUG StartRideJob.init():103 - create a job to start ride 3
16:03:59.350 馃挌 DEBUG PauseRideJob.init():65 - create a job to pause ride 3
16:03:59.351 馃挌 DEBUG ResumeRideJob.init():66 - create a job to resume ride 3
16:03:59.352 馃挌 DEBUG StartRideJob.onRun():110 - run the job to start ride 3
16:04:00.204 馃挌 DEBUG StopRideJob.init():88 - create a job to stop ride 3
16:04:00.204 馃挏 VERBOSE LRJobPersister.put():42 - insert in queue
16:04:00.562 馃挌 DEBUG StartRideJob.onRemove():144 - remove the job to start ride 3
16:04:00.563 馃挋 INFO StartRideJob.onRemove():150 - ride 3 has been started
16:04:00.563 馃挌 DEBUG PauseRideJob.onRun():72 - run a job to pause ride 3
16:04:01.197 馃挌 DEBUG PauseRideJob.onRemove():108 - remove a job to pause ride 3
16:04:01.198 馃挋 INFO PauseRideJob.onRemove():114 - ride 3 is paused
16:04:01.198 馃挌 DEBUG ResumeRideJob.onRun():73 - run a job to resume ride 3
16:04:01.715 馃挌 DEBUG ResumeRideJob.onRemove():109 - remove a job to resume ride 3
16:04:01.715 馃挋 INFO ResumeRideJob.onRemove():115 - ride 3 is resumed
16:04:01.716 馃挌 DEBUG AutoRenameRideJob.onRun():72 - run a job to auto rename ride 3
16:04:02.104 馃挌 DEBUG AutoRenameRideJob.onRemove():119 - remove the job to auto rename ride 3
16:04:02.105 馃挋 INFO AutoRenameRideJob.onRemove():125 - ride 3 has been auto renamed
16:04:02.105 馃挌 DEBUG StopRideJob.onRun():96 - run the job to stop ride 3
16:04:02.248 馃挏 VERBOSE LRJobPersister.remove():54 - remove from queue
16:04:02.249 馃挌 DEBUG StopRideJob.onRemove():130 - remove the job to stop ride 3
16:04:02.250 馃挋 INFO StopRideJob.onRemove():136 - ride 3 has been stopped
Originally posted by @Narayane in #362 (comment)
The text was updated successfully, but these errors were encountered: