添加一下.gitignore

This commit is contained in:
Yun
2025-09-23 11:20:38 +08:00
parent c50530d4bb
commit 062a39b209
3 changed files with 12 additions and 3 deletions
+4
View File
@@ -0,0 +1,4 @@
log
cache
+3 -3
View File
@@ -7,7 +7,6 @@ import (
"time" "time"
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"github.com/yuninks/loggerx"
"github.com/yuninks/timerx" "github.com/yuninks/timerx"
"github.com/yuninks/timerx/priority" "github.com/yuninks/timerx/priority"
) )
@@ -128,9 +127,10 @@ func cluster() {
client := getRedis() client := getRedis()
ctx := context.Background() ctx := context.Background()
log := loggerx.NewLogger(ctx,loggerx.SetToConsole(),loggerx.SetEscapeHTML(false)) // log := loggerx.NewLogger(ctx,loggerx.SetToConsole(),loggerx.SetEscapeHTML(false))
// _ = log
cluster := timerx.InitCluster(ctx, client, "test", timerx.SetPriority(103), timerx.SetLogger(log)) cluster := timerx.InitCluster(ctx, client, "test", timerx.SetPriority(103))
err := cluster.EverySpace(ctx, "test_space1", 1*time.Second, aa, "这是秒任务1") err := cluster.EverySpace(ctx, "test_space1", 1*time.Second, aa, "这是秒任务1")
fmt.Println(err) fmt.Println(err)
err = cluster.EverySpace(ctx, "test_space2", 2*time.Second, aa, "这是秒任务2") err = cluster.EverySpace(ctx, "test_space2", 2*time.Second, aa, "这是秒任务2")
+5
View File
@@ -1,2 +1,7 @@
package timerx package timerx
import "testing"
func Test2(t *testing.T) {
}