mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(arch): add log partitioning and provider delete sync
This commit is contained in:
@@ -26,11 +26,11 @@ func TestLogWriterMetrics(t *testing.T) {
|
||||
startBatch := getExpvarInt(t, "log_write_batch_total")
|
||||
startDropped := getExpvarInt(t, "log_queue_dropped_total")
|
||||
|
||||
dropWriter := NewLogWriter(db, 1, 10, time.Second)
|
||||
dropWriter := NewLogWriter(db, 1, 10, time.Second, nil)
|
||||
dropWriter.Write(model.LogRecord{ModelName: "m1", StatusCode: 200})
|
||||
dropWriter.Write(model.LogRecord{ModelName: "m2", StatusCode: 200})
|
||||
|
||||
writer := NewLogWriter(db, 10, 1, 10*time.Millisecond)
|
||||
writer := NewLogWriter(db, 10, 1, 10*time.Millisecond, nil)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
t.Cleanup(cancel)
|
||||
writer.Start(ctx)
|
||||
|
||||
Reference in New Issue
Block a user