GoyaDo opened a new issue, #2208:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2208

   
![image](https://user-images.githubusercontent.com/31059508/230543194-d4a5c0f7-0d24-4e13-a53e-858131c8c332.png)
   the job is success runing but status is offline and the other job status is 
online ,is right.
   i want this job status is correct
   
   POM
   ```
   <dependency>
               <groupId>org.apache.shardingsphere.elasticjob</groupId>
               <artifactId>elasticjob-lite-spring-boot-starter</artifactId>
               <version>3.0.3</version>
               <exclusions>
                   <exclusion>
                       <groupId>curator-recipes</groupId>
                       <artifactId>org.apache.curator</artifactId>
                   </exclusion>
                   <exclusion>
                       <groupId>curator-framework</groupId>
                       <artifactId>org.apache.curator</artifactId>
                   </exclusion>
               </exclusions>
           </dependency>
   
           <dependency>
               <groupId>org.apache.curator</groupId>
               <artifactId>curator-framework</artifactId>
               <version>5.1.0</version>
           </dependency>
   
           <dependency>
               <groupId>org.apache.curator</groupId>
               <artifactId>curator-recipes</artifactId>
               <version>5.1.0</version>
           </dependency>
   ```
   YAML
   ```
   elasticjob:
     reg-center:
       server-lists: 127.0.0.1:2181
       namespace: jtys_sign_upload_job
     tracing:
       type: RDB
     jobs:
       signDataFlowJob:
         overwrite: true
         elastic-job-class: com.wisdom.jtys.task.elastic.SignDataFlowJob
         cron: 0/10 * * * * ?
         sharding-total-count: 1
         sharding-item-parameters: 0=100
   ```
   JAVA
   ```
   
   @Component
   @Slf4j
   @RequiredArgsConstructor
   public class SignDataFlowJob implements DataflowJob<UploadInfo> {
   
       private final UploadInfoService uploadInfoService;
       private final BaseServiceFeign baseServiceFeign;
       private final TransferDataFactory transferDataFactory;
   
       @Override
       public List<UploadInfo> fetchData(ShardingContext shardingContext) {
   
           // 默认只有一个分片
           int shardingTotalCount = shardingContext.getShardingTotalCount();
           if (shardingTotalCount > 1) {
               return null;
           }
           log.info("当前抓取任务分片:{}", shardingTotalCount);
           return uploadInfoService.schedulerUpload(count);
       }
   
       @Override
       public void processData(ShardingContext shardingContext, 
List<UploadInfo> uploadInfoList) {
   
           log.info("当前处理数据任务分片:{}", shardingContext.getShardingTotalCount());
   
           // ...
       }
   }
   
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to