Skip to content

Commit e151cc3

Browse files
committed
Ensure pushStatus is properly running
1 parent a649a9e commit e151cc3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spec/PushWorker.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ describe('PushWorker', () => {
314314
amount: 1,
315315
},
316316
count: { __op: 'Increment', amount: -1 },
317+
status: 'running',
317318
});
318319
const query = new Parse.Query('_PushStatus');
319320
return query.get(handler.objectId, { useMasterKey: true });
@@ -409,6 +410,7 @@ describe('PushWorker', () => {
409410
amount: 1,
410411
},
411412
count: { __op: 'Increment', amount: -1 },
413+
status: 'running',
412414
});
413415
done();
414416
});

src/StatusHandler.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,8 @@ export function pushStatusHandler(config, existingObjectId) {
295295
}
296296
);
297297
}
298-
299-
// indicate this batch is complete
300298
incrementOp(update, 'count', -1);
299+
update.status = 'running';
301300

302301
return handler.update({ objectId }, update).then(res => {
303302
if (res && res.count === 0) {

0 commit comments

Comments
 (0)