nyaruka / gocommon

Common utility library for the TextIt platform.
Other
7 stars 11 forks source link

Rework `syncx.Batcher` so that it flushes a batch without waiting if it has enough items #95

Closed rowanseymour closed 1 year ago

rowanseymour commented 1 year ago

If for example courier has 1000 msg statuses queued, batcher shouldn't wait to hit timeout.. should just process those 1000.

codecov[bot] commented 1 year ago

Codecov Report

Merging #95 (b946c1e) into main (64a5ea3) will increase coverage by 0.29%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   91.60%   91.89%   +0.29%     
==========================================
  Files          35       35              
  Lines        1655     1678      +23     
==========================================
+ Hits         1516     1542      +26     
+ Misses        105      103       -2     
+ Partials       34       33       -1     
Files Changed Coverage Δ
syncx/batcher.go 100.00% <100.00%> (+7.50%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more