1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 21:50:40 +00:00

Format code

This commit is contained in:
Ming Deng
2020-07-22 23:00:06 +08:00
parent 9c51952db4
commit 30eb889a91
37 changed files with 133 additions and 133 deletions

View File

@ -113,7 +113,7 @@ type Task struct {
Next time.Time
Errlist []*taskerr // like errtime:errinfo
ErrLimit int // max length for the errlist, 0 stand for no limit
errCnt int // records the error count during the execution
errCnt int // records the error count during the execution
}
// NewTask add new task with name, time and func

View File

@ -59,12 +59,12 @@ func TestSpec(t *testing.T) {
func TestTask_Run(t *testing.T) {
cnt := -1
task := func() error {
cnt ++
cnt++
fmt.Printf("Hello, world! %d \n", cnt)
return errors.New(fmt.Sprintf("Hello, world! %d", cnt))
}
tk := NewTask("taska", "0/30 * * * * *", task)
for i := 0; i < 200 ; i ++ {
for i := 0; i < 200; i++ {
e := tk.Run()
assert.NotNil(t, e)
}