|
|
|
@ -4,6 +4,7 @@ import (
|
|
|
|
|
"context"
|
|
|
|
|
"errors"
|
|
|
|
|
"fmt"
|
|
|
|
|
"go.dtapp.net/dorm"
|
|
|
|
|
"go.dtapp.net/gojobs/jobs_gorm_model"
|
|
|
|
|
"go.dtapp.net/gojobs/jobs_mongo_model"
|
|
|
|
|
"go.dtapp.net/gostring"
|
|
|
|
@ -71,7 +72,7 @@ func (c *Client) CreateInCustomId(ctx context.Context, config *ConfigCreateInCus
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CurrentRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -82,7 +83,7 @@ func (c *Client) CreateInCustomId(ctx context.Context, config *ConfigCreateInCus
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
NextRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -93,7 +94,7 @@ func (c *Client) CreateInCustomId(ctx context.Context, config *ConfigCreateInCus
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().AfterSeconds(config.Frequency).Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeFromTime(gotime.Current().AfterSeconds(config.Frequency).Time),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CreateTime: primitive.NewDateTimeFromTime(gotime.Current().Time),
|
|
|
|
@ -169,7 +170,7 @@ func (c *Client) CreateInCustomIdOnly(ctx context.Context, config *ConfigCreateI
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CurrentRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -180,7 +181,7 @@ func (c *Client) CreateInCustomIdOnly(ctx context.Context, config *ConfigCreateI
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
NextRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -191,7 +192,7 @@ func (c *Client) CreateInCustomIdOnly(ctx context.Context, config *ConfigCreateI
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().AfterSeconds(config.Frequency).Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeFromTime(gotime.Current().AfterSeconds(config.Frequency).Time),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CreateTime: primitive.NewDateTimeFromTime(gotime.Current().Time),
|
|
|
|
@ -266,7 +267,7 @@ func (c *Client) CreateInCustomIdMaxNumber(ctx context.Context, config *ConfigCr
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CurrentRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -277,7 +278,7 @@ func (c *Client) CreateInCustomIdMaxNumber(ctx context.Context, config *ConfigCr
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
NextRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -288,7 +289,7 @@ func (c *Client) CreateInCustomIdMaxNumber(ctx context.Context, config *ConfigCr
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().AfterSeconds(config.Frequency).Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeFromTime(gotime.Current().AfterSeconds(config.Frequency).Time),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CreateTime: primitive.NewDateTimeFromTime(gotime.Current().Time),
|
|
|
|
@ -367,7 +368,7 @@ func (c *Client) CreateInCustomIdMaxNumberOnly(ctx context.Context, config *Conf
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CurrentRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -378,7 +379,7 @@ func (c *Client) CreateInCustomIdMaxNumberOnly(ctx context.Context, config *Conf
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeCurrent(),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
NextRunInfo: jobs_mongo_model.TaskRunInfo{
|
|
|
|
@ -389,7 +390,7 @@ func (c *Client) CreateInCustomIdMaxNumberOnly(ctx context.Context, config *Conf
|
|
|
|
|
SystemCpuQuantity: c.config.systemCpuQuantity,
|
|
|
|
|
GoVersion: c.config.goVersion,
|
|
|
|
|
SdkVersion: c.config.sdkVersion,
|
|
|
|
|
RunTime: gotime.Current().AfterSeconds(config.Frequency).Format(),
|
|
|
|
|
RunTime: dorm.NewBsonTimeFromTime(gotime.Current().AfterSeconds(config.Frequency).Time),
|
|
|
|
|
RunIp: config.CurrentIp,
|
|
|
|
|
},
|
|
|
|
|
CreateTime: primitive.NewDateTimeFromTime(gotime.Current().Time),
|
|
|
|
|