feat: add scheduled automatic task matching

This commit is contained in:
richjohnrambo
2026-10-13 15:21:08 +08:00
parent 2a3c411c9b
commit 45ef10b2af
4 changed files with 192 additions and 26 deletions
+15
View File
@@ -0,0 +1,15 @@
package store
import "testing"
func TestRandomDelaySeconds(t *testing.T) {
for index := 0; index < 100; index++ {
value := randomDelaySeconds(900, 1200)
if value < 900 || value > 1200 {
t.Fatalf("delay out of range: %d", value)
}
}
if value := randomDelaySeconds(30, 30); value != 30 {
t.Fatalf("fixed delay = %d, want 30", value)
}
}