Conversation
| override async alarm(alarmProps?: { isRetry: boolean; retryCount: number }): Promise<void> { | ||
| if (alarmProps?.isRetry && alarmProps?.retryCount > MAX_ALARM_RETRIES) { |
There was a problem hiding this comment.
| override async alarm(alarmProps?: { isRetry: boolean; retryCount: number }): Promise<void> { | |
| if (alarmProps?.isRetry && alarmProps?.retryCount > MAX_ALARM_RETRIES) { | |
| override async alarm(alarmProps?: AlarmInvocationInfo): Promise<void> { | |
| if (alarmProps?.isRetry && alarmProps?.retryCount > MAX_ALARM_RETRIES) { |
(i know this was already here, but while we're in the area we may as well make this use the actual type from workers-types instead of redefining it)
|
weird though because it should always be present (apparently the type is like that for backwards compatibility) - does this happen for you consistently, or is it flaky? is this in local dev or prod? if local dev, what version of wrangler or vite? |
|
I got the error consistently, but since it should always be present I looked a bit more in details. Been using https://github.com/evanderkoogh/otel-cf-workers to get traces, and this created a proxy for alarm that did not pass the arguments correctly. So the problem in this case was this library. |
According to docs the alarmprops is optional. Getting this error without, and it doesnt keep the container alive as long as defined in
sleepAfter.