minty
minty
CDCloudflare Developers
Created by shun on 10/15/2024 in #workers-help
Workers build unstable?
just and FYI that I am also experiencing this. Cancelling the build and retrying sometimes works
9 replies
CDCloudflare Developers
Created by minty on 9/26/2024 in #queues
"Could not acknowledge messages"
ok thank you very much
6 replies
CDCloudflare Developers
Created by minty on 9/26/2024 in #queues
"Could not acknowledge messages"
any update here?
6 replies
CDCloudflare Developers
Created by minty on 9/26/2024 in #queues
"Could not acknowledge messages"
queue: b093f8750abb42f5a21a33b041b7b00e account: 249eba20c65105004ea39c3d458c235b i just tried clicking the acknowledge message button on the messages
6 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
(obviously I will add the db.end() as well)
18 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
is this sort of what you mean?
const withDb = middleware((opts) => {
const db = getServerlessDBInstance();

const result = opts.next({ ctx: { db } });

return result;
});
const withDb = middleware((opts) => {
const db = getServerlessDBInstance();

const result = opts.next({ ctx: { db } });

return result;
});
18 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
ahh perfect ok
18 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
got it, thank you! I will try that out
18 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
is that what you mean?
18 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
Oh I think I see what you mean. Like the middleware would be:
openDB()

const result = await next()

closeDB()

return result
openDB()

const result = await next()

closeDB()

return result
18 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
Can you explain what you mean why the awaiting the next() variable? I would like the procedure to have access to the ctx.db, but not have to remember to close it
18 replies
TtRPC
Created by minty on 11/16/2023 in #❓-help
Middleware or request lifecycle hook to run after procedure?
I am using Neon (neon.tech) as my DB provider and they explicitly say to close it at the end of every request:
The Pool and Client objects must be connected, used, and closed within a single request handler. Don't create the objects outside a request handler; don't create them in one handler and try to reuse them in another; and to avoid exhausting available connections, don't forget to close them.
The Pool and Client objects must be connected, used, and closed within a single request handler. Don't create the objects outside a request handler; don't create them in one handler and try to reuse them in another; and to avoid exhausting available connections, don't forget to close them.
from here: https://neon.tech/docs/serverless/serverless-driver
18 replies