firestore-revenuecat-purchases icon indicating copy to clipboard operation
firestore-revenuecat-purchases copied to clipboard

Multiple events per transaction

Open RohovDmytro opened this issue 9 months ago • 1 comments

Hi! I'm seeing multiple runs of a Google Cloud Function created by RevenueCat Extension.

  1. RevenueCat Integration creates a Google Cloud function
  2. Min instances for it is 0
  3. When RevenueCat posts an event it make GCP Function start from cold
  4. The start takes too long so someone (RevenueCat?) detects a timeout
  5. RevenueCat sends a second request (to already pre-warmed function from the first call)
  6. The first request actually was not cancelled, just delayed.
  7. THe event from the first request start being processed
  8. The event from the second requests start being processed

Thus I have a situation when a single RevenueCat event dispatches two events both of which got handled.

Can we make RevenueCat wait for the cold start longer? Can we set a min instances for a Google Cloud Function through extension settings?

RohovDmytro avatar May 18 '24 18:05 RohovDmytro