update jobs

This commit is contained in:
shoopea 2020-01-12 17:17:14 +08:00
parent fbc31dc7ef
commit 7358ca67e8
2 changed files with 4 additions and 1 deletions

3
job.go
View File

@ -3,6 +3,7 @@ package main
import (
"archive/zip"
"bytes"
"compress/zlib"
"encoding/json"
"errors"
"fmt"
@ -18,7 +19,7 @@ import (
)
func createJob(jobTypeID64 int64, priority int32, userID64 int64, trigger int64, schedule time.Time, payload []byte) (int64, error) {
zb := make(bytes.Buffer)
zb := new(bytes.Buffer)
zw := zlib.NewWriter(&zb)
zw.Write(payload)
zw.Close()

2
obj.go
View File

@ -1,6 +1,8 @@
package main
import (
"bytes"
"compress/zlib"
"encoding/json"
"errors"
"fmt"