MCPcopy
hub / github.com/FlowiseAI/Flowise / updateStorageUsage

Function updateStorageUsage

packages/server/src/utils/quotaUsage.ts:148–151  ·  view source on GitHub ↗
(orgId: string, _: string = '', totalSize: number, usageCacheManager?: UsageCacheManager)

Source from the content-addressed store, hash-verified

146
147// Storage does not renew per month nor do we store the total size in database, so we just store the total size in cache
148export const updateStorageUsage = (orgId: string, _: string = '', totalSize: number, usageCacheManager?: UsageCacheManager) => {
149 if (!usageCacheManager) return
150 usageCacheManager.set(`storage:${orgId}`, totalSize)
151}
152
153export const checkStorage = async (orgId: string, subscriptionId: string, usageCacheManager: UsageCacheManager) => {
154 if (!usageCacheManager || !subscriptionId) return

Callers 14

deleteFileFunction · 0.90
executeUpsertFunction · 0.90
createFileAttachmentFunction · 0.90
executeFlowFunction · 0.90
deleteChatflowFunction · 0.90
removeAllChatMessagesFunction · 0.90
deleteDocumentStoreFunction · 0.90
_saveFileToStorageFunction · 0.90
_saveChunksToStorageFunction · 0.90

Calls 1

setMethod · 0.80

Tested by

no test coverage detected