const fiveMinutesAgo = new Date(Date.now() - 5 * 60 * 1000).toISOString()
const { data: notifications, error: notificationsError } = await supabase
.from('notifications')
.update({ processingAt: new Date().toISOString() })
.is('deliveredAt', null)
.not('subscriberKey', 'is', null)
.or(`processingAt.is.null,processingAt.lt.${fiveMinutesAgo}`)
.select()
const fiveMinutesAgo = new Date(Date.now() - 5 * 60 * 1000).toISOString()
const { data: notifications, error: notificationsError } = await supabase
.from('notifications')
.update({ processingAt: new Date().toISOString() })
.is('deliveredAt', null)
.not('subscriberKey', 'is', null)
.or(`processingAt.is.null,processingAt.lt.${fiveMinutesAgo}`)
.select()