File
Blob: src/workerd/api/scheduled.c++
| 1 | // Copyright (c) 2017-2022 Cloudflare, Inc. |
| 2 | // Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | // https://opensource.org/licenses/Apache-2.0 |
| 4 | |
| 5 | #include "scheduled.h" |
| 6 | |
| 7 | #include <workerd/io/io-context.h> |
| 8 | |
| 9 | namespace workerd::api { |
| 10 | |
| 11 | ScheduledEvent::ScheduledEvent(double scheduledTime, kj::StringPtr cron) |
| 12 | : ExtendableEvent("scheduled"), |
| 13 | scheduledTime(scheduledTime), |
| 14 | cron(kj::str(cron)) {} |
| 15 | |
| 16 | void ScheduledEvent::noRetry() { |
| 17 | IoContext::current().setNoRetryScheduled(); |
| 18 | } |
| 19 | |
| 20 | } // namespace workerd::api |