Comments (8)
Logically, if the jobManager isnt running, and stop was never called, then it must not have been started correctly. But looking at the constructor. running=true is set very early.
I cant work it out.
from android-priority-jobqueue.
Is there an underlying problem with starting a lot of JobManagers, do you think?
from android-priority-jobqueue.
Make sure you always call jobManager.start() this will guarantee that the particular jobmanager is running.
from android-priority-jobqueue.
Hi. Is this a known issue?
I saw a stack overflow 'issue' that said something about making lots of JobManagers with persistant queues - maybe hitting up the underlying sqlite layer with multiple jobmanagers at creation time causes some kind of failure? Im just guessing: What Ive done to try to avoid this is:
- reduced the number of job managers being created by using groupIds.
- made sure Im using different jobmanager ids.
- as only 1 of the JobManagers actually needs persistant jobs, I passed in a custom JobQueue factory that returned non-persistant queues for both types of queue
As of doing that I havent seen the problem again, but obviously with these sorts of itermittant values, thats no guarentee. Ill update this thread if it happens again.
from android-priority-jobqueue.
BTW, Ive also hit problems with very big jobs - first of all the android cursor explodes at 1 or 2MB, and then getting around that issue with a custom persistent queue then explodes the deserializaiton.
So I gave up and stored the large part of the job in a file.
from android-priority-jobqueue.
@stefoid Are you providing an ID to your jobs ? Or at least you should if they are decoupled (otherwise use 1 job manager). Also, there are no internal calls to stop
so i'm not sure how it is happening either. Do you have a test app that i can look at ? (btw, sorry about the late reply, i just came back from a long vacation)
from android-priority-jobqueue.
Hi. Our problem seems to have gone. What we were doing was creating lots of JobManagers for various duties, most of which did not need persistent Jobs, so we didnt create them with an Id.
What we are doing now is passing the same non-persistent job queue to both createPersistentJobQueue as well as nonPersistent, so we dont involve slqite when we dont need to.
And we have consolidated a lot of JobManagers and are using group ids instead.
What I believe was happening (didnt see/capture it happening as it was intermittent) was getting and invisibly swallowing some exception or other during JobManager creation while JobManager was trying to setup to Sqlite. Thats the only thing that makes sense - so every now and then we got back a JobManager that wasnt actually running.
A suggestion might be to more easily configure a non-persistent JobManager if you dont require that functionality, and make construction exceptions more visible in some way.
from android-priority-jobqueue.
To create a non-persistent job queue, you can provide a queue factory in the job configuration and just provide implementation of a queue that does nothing and always returns empty result. Glad issue is resolved, please re-submit if you can reproduce it.
from android-priority-jobqueue.
Related Issues (20)
- how to update custom view from onRun() method
- java.lang.IllegalAccessError
- cannot save job to disk at com.birbit.android.jobqueue.persistentQueue.sqlite.SqliteJobQueue.persistJobToDisk
- what is the default job queue size ?
- can i add a job to queue by specifying the delay after which it has to scheduled ?? HOT 1
- how to get job Thread
- I disagree with your deprecation because... HOT 2
- WorkManager
- Retry jobs are not sequential HOT 1
- While create JobManager for unit testing then getting exception like this
- How to set job id manually?
- Why use ThreadGroup rather than ThreadPool?
- package android does not belong to HOT 1
- Fatal Exception: android.database.sqlite.SQLiteException
- Hi Yigit, hope you can help us out
- cannot save job to disk
- android.database.sqlite.SQLiteBlobTooBigException
- Cancel Jobs
- Fatal Exception: java.lang.SecurityException Package android does not belong to 10275 HOT 2
- 使用任务队列导致程序卡死
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-priority-jobqueue.