From 014bcb78734587c1f94a1dd607c7209fcfea6ea1 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 2 Jan 2020 20:05:33 +0800 Subject: [PATCH] update --- job.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/job.go b/job.go index 645e824..3013e4e 100644 --- a/job.go +++ b/job.go @@ -17,7 +17,7 @@ import ( tb "gopkg.in/tucnak/telebot.v2" ) -func createJob(jobTypeID int32, priority int32, userID64 int64, trigger int64, schedule time.Time, payload []byte) (int64, error) { +func createJob(jobTypeID64 int64, priority int32, userID64 int64, trigger int64, schedule time.Time, payload []byte) (int64, error) { if len(payload) > 20000 { return 0, errors.New("payload too long") } @@ -30,8 +30,8 @@ func createJob(jobTypeID int32, priority int32, userID64 int64, trigger int64, s } defer stmt.Close() - res, err := stmt.Exec(objTypeJob, jobTypeID) - s := fmt.Sprintf("createJob, insert obj(%d, %d)", objTypeJob, jobTypeID) + res, err := stmt.Exec(objTypeJob, jobTypeID64) + s := fmt.Sprintf("createJob, insert obj(%d, %d)", objTypeJob, jobTypeID64) logOnError(err, s) if err != nil { return 0, err @@ -60,9 +60,9 @@ func createJob(jobTypeID int32, priority int32, userID64 int64, trigger int64, s return objId, nil } -func createJobCallback(jobTypeID int32, userID64 int64, msgTypeID64 int64, payload []byte, timeout time.Duration) error { +func createJobCallback(jobTypeID64 int64, userID64 int64, msgTypeID64 int64, payload []byte, timeout time.Duration) error { //t, err := time.Parse(time.RFC3339, "9999-12-31T00:00:00+00:00") - jobID64, err := createJob(jobTypeID, objJobPriority, userID64, 0, time.Unix(maxUnixTimestamp, 0).UTC(), payload) + jobID64, err := createJob(jobTypeID64, objJobPriority, userID64, 0, time.Unix(maxUnixTimestamp, 0).UTC(), payload) if err != nil { return err }