Open krrishdholakia opened 4 months ago
Just a note on this, for serverless deployments, the batch job should immediately be triggered if LiteLLM gets a SIGTERM
signal. Without this, there's a decent chance the queue will be lost and stuff will end up going missing.
https://cloud.google.com/run/docs/container-contract#forced-termination-jobs
@Manouchehri can i just hook into the fastapi shutdown event for this?
Likely, just test it locally with kill -SIGTERM pid_of_litellm
to make sure it works.
I think we can combine update data to 1 batched query
UPDATE LiteLLM_UserTable
SET spend = spend + 100
WHERE user_id = 'some_user_id';
Also this - https://prisma-client-py.readthedocs.io/en/stable/reference/operations/#updating-atomic-fields
The Feature
in
update_db()
,If any call fails, add them to an in-memory job queue for updating db on a periodic basis
Motivation, pitch
reduce prisma clients used / call
Twitter / LinkedIn details
No response