mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-25 13:07:20 +00:00
add where clause for marking all jobs pending to reduce the time for writing to db
This commit is contained in:
parent
bd4f451513
commit
2630c97a4e
@ -138,7 +138,10 @@ public class JobDatabase extends Database {
|
|||||||
ContentValues contentValues = new ContentValues();
|
ContentValues contentValues = new ContentValues();
|
||||||
contentValues.put(Jobs.IS_RUNNING, 0);
|
contentValues.put(Jobs.IS_RUNNING, 0);
|
||||||
|
|
||||||
databaseHelper.getWritableDatabase().update(Jobs.TABLE_NAME, contentValues, null, null);
|
String query = Jobs.IS_RUNNING + " = ?";
|
||||||
|
String[] args = new String[] { "1" };
|
||||||
|
|
||||||
|
databaseHelper.getWritableDatabase().update(Jobs.TABLE_NAME, contentValues, query, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void deleteJobs(@NonNull List<String> jobIds) {
|
public synchronized void deleteJobs(@NonNull List<String> jobIds) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user