elastic-job-spring-boot-starter icon indicating copy to clipboard operation
elastic-job-spring-boot-starter copied to clipboard

注解定义任务 shardingTotalCount 值一致不变,用的默认值1

Open zxlxgd opened this issue 4 years ago • 1 comments

@ElasticJobConf(name = "MySimpleJob", cron = "0/10 * * * * ?", shardingTotalCount = 2, shardingItemParameters = "0=0,1=1", description = "简单任务")

System.out.println("分片参数:" + shardParamter);

分片参数 一直是1

zxlxgd avatar Jan 04 '21 10:01 zxlxgd

找到问题原因了:overwrite = true 才可以覆盖新的配置,要不然一直取得第一次写入zk的 配置,哈哈

zxlxgd avatar Jan 04 '21 10:01 zxlxgd