Amplitude-Python icon indicating copy to clipboard operation
Amplitude-Python copied to clipboard

fix: Respect flush_queue_size when calling Workers.flush

Open dsaxton-1password opened this issue 1 month ago • 2 comments

Summary

Currently Workers.flush doesn't respect flush_queue_size which can cause a large number of events to be sent to Amplitude when this method is called. This can then trigger errors such as 413 (Content Too Large). The change here updates the method to send the data in batches according to flush_queue_size in order to prevent this.

This modifies the return type of Workers.flush from Future to List[Future] which I believe only impacts the behavior in Timeline.flush but I could be wrong there.

Checklist

  • [x] Does your PR title have the correct title format?
  • Does your PR have a breaking change?: Hopefully not

dsaxton-1password avatar Nov 03 '25 18:11 dsaxton-1password