adam
adam6mo ago

`completedTime` of scheduled function meta data incorrect

const response = ctx.db.system.get(jobId) The completedTime of response seems to be set incorrectly if the scheduled function calls an internal mutation. Seems to be set correctly if the scheduled function is for an internal action.
{
"_creationTime": 1721200676326.9324,
"_id": "kc29zypvpyzcjw9k06qtawm2qh6x262n",
"args": [
{
"orderId": "ks70esgps7akdvhp807zxc4hhx6x38p6"
}
],
"completedTime": 1721200676417.7048, // <= This comes before the `scheduledTime`
"name": "orders.js:_setTimedOut",
"scheduledTime": 1721200736327,
"state": {
"kind": "success"
}
}
{
"_creationTime": 1721200676326.9324,
"_id": "kc29zypvpyzcjw9k06qtawm2qh6x262n",
"args": [
{
"orderId": "ks70esgps7akdvhp807zxc4hhx6x38p6"
}
],
"completedTime": 1721200676417.7048, // <= This comes before the `scheduledTime`
"name": "orders.js:_setTimedOut",
"scheduledTime": 1721200736327,
"state": {
"kind": "success"
}
}
0 Replies
No replies yetBe the first to reply to this messageJoin