ampp
ampp6mo ago

Scheduled function data is no longer compatible makeFunctionReference

I think this happened with 1.13 but haven't gone to any effort to dig into it as its not exactly a big deal. I'm not sure how i could have caused this either, i had to go fix a previously working bit of code i wrote a couple weeks ago. const query = scheduledFunction.name i had to change to const query = scheduledFunction.name.replace('.js', '') otherwise i get:
Error: [CONVEX A(engine/events:retryScheduledEventHandlerFunctionReference)] [Request ID: 9ae1b87f138cd112] Server Error
Uncaught Error: Couldn't resolve api.engine.events.js.batchRegisteredMutations
Error: [CONVEX A(engine/events:retryScheduledEventHandlerFunctionReference)] [Request ID: 9ae1b87f138cd112] Server Error
Uncaught Error: Couldn't resolve api.engine.events.js.batchRegisteredMutations
I think the function should accept whatever is saved to the db. But I'd almost argue that the name output from _scheduled_functions shouldn't have a extension as its possibly incoherent because of ts/js. I haven't quite started storing these things in the db myself.
2 Replies
ballingt
ballingt6mo ago
Thanks @ampp for reporting, we'll look into this, planning on bugfix npm package release tomorrow.
lee
lee6mo ago
this should be fixed. thanks for reporting!