MOBILE-2253 core: Fix processQueue in filepool
parent
a1c80fb311
commit
e4ed9301fb
|
@ -2269,8 +2269,8 @@ export class CoreFilepoolProvider {
|
||||||
*
|
*
|
||||||
* @return {Promise} Resolved on success. Rejected on failure.
|
* @return {Promise} Resolved on success. Rejected on failure.
|
||||||
*/
|
*/
|
||||||
protected processImportantQueueItem() : void {
|
protected processImportantQueueItem() : Promise<any> {
|
||||||
this.appDB.getRecords(this.QUEUE_TABLE, null, 'priority DESC, added ASC', null, 0, 1).then((items) => {
|
return this.appDB.getRecords(this.QUEUE_TABLE, null, 'priority DESC, added ASC', null, 0, 1).then((items) => {
|
||||||
let item = items.pop();
|
let item = items.pop();
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return Promise.reject(this.ERR_QUEUE_IS_EMPTY);
|
return Promise.reject(this.ERR_QUEUE_IS_EMPTY);
|
||||||
|
|
Loading…
Reference in New Issue