This commit is contained in:
Yun
2023-09-09 23:32:37 +08:00
parent a9570cb743
commit fdc303e618
5 changed files with 16 additions and 20 deletions
+5 -5
View File
@@ -31,19 +31,19 @@ func main() {
func worker() {
client := getRedis()
w := timer.InitWorker(context.Background(), client, &Worker{})
w.AddJob("test", "test", 1*time.Second, map[string]interface{}{
w.Add("test", "test", 1*time.Second, map[string]interface{}{
"test": "test",
})
w.AddJob("test2", "test", 1*time.Second, map[string]interface{}{
w.Add("test2", "test", 1*time.Second, map[string]interface{}{
"test": "test",
})
w.AddJob("test3", "test", 1*time.Second, map[string]interface{}{
w.Add("test3", "test", 1*time.Second, map[string]interface{}{
"test": "test",
})
w.AddJob("test4", "test", 1*time.Second, map[string]interface{}{
w.Add("test4", "test", 1*time.Second, map[string]interface{}{
"test": "test",
})
w.AddJob("test5", "test", 1*time.Second, map[string]interface{}{
w.Add("test5", "test", 1*time.Second, map[string]interface{}{
"test": "test",
})