Skip to content

Commit

Permalink
Add extra condition for skippable cron trigger contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Garfield committed Oct 4, 2022
1 parent 8e52a53 commit 152ff62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion programs/queue/src/instructions/queue_crank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pub fn handler(ctx: Context<QueueCrank>, data_hash: Option<u64>) -> Result<()> {

// If the schedule is marked as skippable, set the started_at of the exec context
// to be the threshold moment just before the current timestamp.
let started_at = if skippable {
let started_at = if skippable && current_timestamp > threshold_timestamp {
prev_timestamp(current_timestamp, schedule)
.ok_or(ClockworkError::InvalidTrigger)?
} else {
Expand Down

0 comments on commit 152ff62

Please sign in to comment.