mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Chore/product id telemetry (#5329)
* add telemetry for productId * updated multiple services (chatflows, buildChatflow, upsertVector) to use the new method for fetching product ID from subscriptions, improving consistency and error handling
This commit is contained in:
@@ -1036,9 +1036,7 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
||||
const orgId = org.id
|
||||
organizationId = orgId
|
||||
const subscriptionId = org.subscriptionId as string
|
||||
|
||||
const subscriptionDetails = await appServer.usageCacheManager.getSubscriptionDataFromCache(subscriptionId)
|
||||
const productId = subscriptionDetails?.productId || ''
|
||||
const productId = await appServer.identityManager.getProductIdFromSubscription(subscriptionId)
|
||||
|
||||
await checkPredictions(orgId, subscriptionId, appServer.usageCacheManager)
|
||||
|
||||
|
||||
@@ -276,9 +276,7 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
|
||||
|
||||
const orgId = org.id
|
||||
const subscriptionId = org.subscriptionId as string
|
||||
|
||||
const subscriptionDetails = await appServer.usageCacheManager.getSubscriptionDataFromCache(subscriptionId)
|
||||
const productId = subscriptionDetails?.productId || ''
|
||||
const productId = await appServer.identityManager.getProductIdFromSubscription(subscriptionId)
|
||||
|
||||
const executeData: IExecuteFlowParams = {
|
||||
componentNodes: appServer.nodesPool.componentNodes,
|
||||
|
||||
Reference in New Issue
Block a user