Skip to content

Commit

Permalink
fix(handle-events): update debug
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Sep 19, 2024
1 parent 481ad77 commit 3657a2f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions functions/lib/events/handle-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const createEvent = async (storeId, id, documentId) => {

if (docEventSnapshot.exists) {
const { createdAt } = docEventSnapshot.data()
if ((Timestamp.now() - new Date(createdAt).getTime()) > limitTimeProcessing) {
if ((new Date().getTime() - new Date(createdAt).getTime()) > limitTimeProcessing) {
logger.info('1')
await docEvent.delete()
return admin.firestore().doc(`${documentId}`)
Expand All @@ -26,8 +26,6 @@ const createEvent = async (storeId, id, documentId) => {
})
.then(() => null)
}
logger.info('2')
return null
}

logger.info('3')
Expand Down

0 comments on commit 3657a2f

Please sign in to comment.