We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这是我的GO代码
package main import ( "context" "github.com/feixiaobo/go-xxl-job-client/v2" "github.com/feixiaobo/go-xxl-job-client/v2/option" "github.com/sirupsen/logrus" ) func main() { client := xxl.NewXxlClient( option.WithAppName("go-example"), // option.WithAccessToken("edqedewfrqdrfrfr"), option.WithEnableHttp(true), // xxl_job v2.2之后的版本 option.WithClientPort(8083), option.WithAdminAddress("http://127.0.0.1:9010/xxl-job-admin"), ) client.SetLogger(&logrus.Entry{ Logger: logrus.New(), Level: logrus.InfoLevel, }) client.RegisterJob("testJob", XxlJobTest) logrus.Info("run") client.Run() // 启动客户端 } func XxlJobTest(ctx context.Context) error { logrus.Info(ctx, "golang job run success >>>>>>>>>>>>>>") val, _ := xxl.GetParam(ctx, "test") logrus.Info("job param:", val) param, _ := xxl.GetParam(ctx, "name") // 获取输入参数 logrus.Info(ctx, "the input param:", param) shardingIdx, shardingTotal := xxl.GetSharding(ctx) // 获取分片参数 logrus.Info(ctx, "the sharding param: idx:", shardingIdx, ", total:", shardingTotal) return nil }
这是我的XXl-JOB-ADMIN v2.3.0
v2.3.0
这是运行结果:
不知道是哪里除了问题,求助大佬~
@feixiaobo
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这是我的GO代码
这是我的XXl-JOB-ADMIN
v2.3.0
这是运行结果:
不知道是哪里除了问题,求助大佬~
@feixiaobo
The text was updated successfully, but these errors were encountered: