1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-27 20:45:56 +00:00

Add a skeleton queue

This patch introduces a basic, in-memory queue that only holds emails for now.

This slows down the benchmarks because we don't yet have a way to wait for
delivery (even if fake), that will come in later patches.
This commit is contained in:
Alberto Bertogli
2015-10-31 16:48:01 +00:00
parent 701f359634
commit 58de5a6200
4 changed files with 273 additions and 1 deletions

View File

@@ -224,6 +224,9 @@ func BenchmarkManyEmails(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
sendEmail(b, c)
// TODO: Make sendEmail() wait for delivery, and remove this.
time.Sleep(10 * time.Millisecond)
}
}
@@ -234,6 +237,9 @@ func BenchmarkManyEmailsParallel(b *testing.B) {
for pb.Next() {
sendEmail(b, c)
// TODO: Make sendEmail() wait for delivery, and remove this.
time.Sleep(100 * time.Millisecond)
}
})
}