Fixes journeys not scheduling properly (#622)

This commit is contained in:
Chris Anderson 2025-01-25 23:19:58 -06:00 committed by GitHub
parent 2a780aab93
commit be400ec40c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,8 @@ export default class ScheduledEntranceOrchestratorJob extends Job {
.whereJsonPath('journey_steps.data', '$.trigger', '=', 'schedule')
.whereJsonPath('journey_steps.data', '$.multiple', '=', true)
.whereNotNull('journey_steps.next_scheduled_at')
.where('journey_steps.next_scheduled_at', '<=', new Date()),
.where('journey_steps.next_scheduled_at', '<=', new Date())
.select('journey_steps.*', 'journeys.project_id'),
) as Array<JourneyEntrance & { project_id: number }>
if (!entrances.length) return