Skip to content

fix: calculate afterConstrain diff in minutes#2581

Open
badcristian wants to merge 1 commit intoBinarCode:masterfrom
badcristian:fix-after-constraint
Open

fix: calculate afterConstrain diff in minutes#2581
badcristian wants to merge 1 commit intoBinarCode:masterfrom
badcristian:fix-after-constraint

Conversation

@badcristian
Copy link
Copy Markdown

fixes #2575

this was used on line 47:
$schedule->timestamp_target->diffInMinutes(now()->floorSeconds()) >= $schedule->delay_minutes

instead of this:
$schedule->timestamp_target->diffInMinutes(now()->floorSeconds()) === $schedule->delay_minutes

because the second option will work only if mailator will be run every minute, which will probably not happen. So, for example, if the notification should be sent 10m after a target time and when the mailator is run we are more than 20m past it i think this should return true anyway.

@frankmichel
Copy link
Copy Markdown

@binaryk Will this bugfix be implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In After Constraint, minutes frequency not working.

2 participants