You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/21 01:37:01 UTC

[GitHub] [shardingsphere-elasticjob] TeslaCN opened a new issue #1622: Why not support multiple job error handlers?

TeslaCN opened a new issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622


   ## Feature Request
   
   https://github.com/apache/shardingsphere-elasticjob/blob/e1bf8623713742d19500518545848f91b6d9944d/elasticjob-api/src/main/java/org/apache/shardingsphere/elasticjob/api/JobConfiguration.java#L64-L68
   
   ### Describe the feature you would like.
   Remove field "jobErrorHandlerType". The job will have 3 error handlerse if I add 3 instances of ErrorHandlerConfiguration.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-713352479


   > How to config `THROW` error handler in the new API?
   
   `THROW` is specified by a configuration class without any fields.
   ```java
   public final class ThrowErrorHandlerConfiguration implements ErrorHandlerConfiguration {
       
       @Override
       public String getType() {
           return "THROW";
       }
   }
   ```
   
   I can send a email before throw an exception.
   ```java
                   .addExtraConfigurations(new EmailConfiguration())
                   .addExtraConfigurations(new ThrowErrorHandlerConfiguration())
                   .addExtraConfigurations(new LogErrorHandlerConfiguration()) // Will not be invoked.
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu commented on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-713350392


   How to config `THROW` error handler in the new API?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-728135140


   The branch [TeslaCN/fix-1622](https://github.com/TeslaCN/shardingsphere-elasticjob/tree/fixes-1622) is base on configuring job error handler by JobExtraConfiguration. Since https://github.com/apache/shardingsphere-elasticjob/pull/1626 has already revert the way to configure job error handler, I think we can further discuss this issue and do this in a future version.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-713300657


   ### Current API 
   ```java
       private JobConfiguration createJobConfiguration() {
           return JobConfiguration.newBuilder("test_job", 3)
                   .cron("0/1 * * * * ?").shardingItemParameters("0=A,1=B,2=C").jobParameter("param").failover(true).misfire(false)
                   .jobErrorHandlerType("THROW")
                   .description("desc").build();
       }
   ```
   
   ### How about the following API ? 
   ```java
       private JobConfiguration createJobConfiguration() {
           return JobConfiguration.newBuilder("test_job", 3)
                   .cron("0/1 * * * * ?").shardingItemParameters("0=A,1=B,2=C").jobParameter("param").failover(true).misfire(false)
                   .addExtraConfigurations(new EmailConfiguration())
                   .addExtraConfigurations(new DingtalkConfiguration())
                   .addExtraConfigurations(new LogErrorHandlerConfiguration())
                   .description("desc").build();
       }
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-713371643


   I did some changes in https://github.com/TeslaCN/shardingsphere-elasticjob/tree/fixes-1622


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu commented on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-723524744


   It is a good idea, maybe you can submit the pull request and we can review your change.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu commented on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-713282560


   It is better to support multiple job error handlers.
   I am not sure we can do it now or after 3.0.0-beta release.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] terrymanu edited a comment on issue #1622: Why not support multiple job error handlers?

Posted by GitBox <gi...@apache.org>.
terrymanu edited a comment on issue #1622:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1622#issuecomment-713350392


   The configuration of `THROW` error handler maybe need to discuss.
   It is in consist with `type` based config like sharding or executors


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org