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/19 10:33:25 UTC

[GitHub] [shardingsphere-elasticjob] terrymanu opened a new issue #1597: Adapt spring boot starter with job error handler

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


   


----------------------------------------------------------------
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 #1597: Adapt spring boot starter with job error handler

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


   I can make it.


----------------------------------------------------------------
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 #1597: Adapt spring boot starter with job error handler

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


   Good. And we can add ${name} if support multiple error handler in future.


----------------------------------------------------------------
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 #1597: Adapt spring boot starter with job error handler

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


   Maybe we can simply configurations if only one error handler can be configured.
   
   ```
   simpleJob.elasticJobClass=org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootSimpleJob
   simpleJob.cron=0/5 * * * * ?
   simpleJob.shardingTotalCount=3
   simpleJob.shardingItemParameters=`0=Beijing,1=Shanghai,2=Guangzhou`
   
   simpleJob.extraConfigurations.errorHandler.webhook=my-webhook
   simpleJob.extraConfigurations.errorHandler.keyword=my-keyword
   simpleJob.extraConfigurations.errorHandler.secret=my-secret
   
   # simpleJob.extraConfigurations.errorHandler.host=smtp.myhost
   # simpleJob.extraConfigurations.errorHandler.port=465
   # simpleJob.extraConfigurations.errorHandler.username=my-username
   # simpleJob.extraConfigurations.errorHandler.password=my-password
   # simpleJob.extraConfigurations.errorHandler.from=my@email.com
   # simpleJob.extraConfigurations.errorHandler.to=target@email.com
   # simpleJob.extraConfigurations.errorHandler.debug=true
   ```


----------------------------------------------------------------
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 #1597: Adapt spring boot starter with job error handler

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


   We can talk about prop format first, how about 
   
   ```
   simpleJob.elasticJobClass=org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootSimpleJob
   simpleJob.cron=0/5 * * * * ?
   simpleJob.shardingTotalCount=3
   simpleJob.shardingItemParameters=`0=Beijing,1=Shanghai,2=Guangzhou`
   
   simpleJob.extraConfigurations.errorHandler.dingtalk.webhook=my-webhook
   simpleJob.extraConfigurations.errorHandler.dingtalk.keyword=my-keyword
   simpleJob.extraConfigurations.errorHandler.dingtalk.secret=my-secret
   
   simpleJob.extraConfigurations.errorHandler.email.host=smtp.myhost
   simpleJob.extraConfigurations.errorHandler.email.port=465
   simpleJob.extraConfigurations.errorHandler.email.username=my-username
   simpleJob.extraConfigurations.errorHandler.email.password=my-password
   simpleJob.extraConfigurations.errorHandler.email.from=my@email.com
   simpleJob.extraConfigurations.errorHandler.email.to=target@email.com
   simpleJob.extraConfigurations.errorHandler.email.debug=true
   ```


----------------------------------------------------------------
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 closed issue #1597: Adapt spring boot starter with job error handler

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #1597:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1597


   


----------------------------------------------------------------
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 edited a comment on issue #1597: Adapt spring boot starter with job error handler

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


   Maybe we can simply configurations if only one error handler can be configured.
   
   ```
   simpleJob.elasticJobClass=org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootSimpleJob
   simpleJob.cron=0/5 * * * * ?
   simpleJob.shardingTotalCount=3
   simpleJob.shardingItemParameters=`0=Beijing,1=Shanghai,2=Guangzhou`
   simpleJob.jobErrorHandlerType=DINGTALK
   
   simpleJob.extraConfigurations.errorHandler.webhook=my-webhook
   simpleJob.extraConfigurations.errorHandler.keyword=my-keyword
   simpleJob.extraConfigurations.errorHandler.secret=my-secret
   
   # simpleJob.extraConfigurations.errorHandler.host=smtp.myhost
   # simpleJob.extraConfigurations.errorHandler.port=465
   # simpleJob.extraConfigurations.errorHandler.username=my-username
   # simpleJob.extraConfigurations.errorHandler.password=my-password
   # simpleJob.extraConfigurations.errorHandler.from=my@email.com
   # simpleJob.extraConfigurations.errorHandler.to=target@email.com
   # simpleJob.extraConfigurations.errorHandler.debug=true
   ```


----------------------------------------------------------------
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 #1597: Adapt spring boot starter with job error handler

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


   Now I have designed a new configuration format.
   
   ### Before
   ```yaml
       simpleJob:
         elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootSimpleJob
         cron: 0/5 * * * * ?
         shardingTotalCount: 3
         shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
         props:
           email:
             host: host
             port: 465
             username: username
             password: password
             protocol: smtp
             useSsl: true
             subject: ElasticJob error message
             from: from@xxx.com
             to: to1@xxx.com,to2@xxx.com
             cc: cc@xxx.com
             bcc: bcc@xxx.com
             debug: false
   ```
   
   ### After
   ```yaml
       simpleJob:
         elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootSimpleJob
         cron: 0/5 * * * * ?
         shardingTotalCount: 3
         shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
         extraConfigurationBeans:
         - beanClass: org.apache.shardingsphere.elasticjob.error.handler.dingtalk.DingtalkConfiguration
           props:
             webhook: my-webhook
             keyword: my-keyword
             secret: my-secret
         - beanClass: org.apache.shardingsphere.elasticjob.error.handler.email.EmailConfiguration
           props:
             host: smtp.myhost
             port: 465
             username: my-username
             password: my-password
             useSsl: true
             from: my@email.com
             to: target@email.com
             debug: true
   ```


----------------------------------------------------------------
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 #1597: Adapt spring boot starter with job error handler

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


   @terrymanu This issue can be closed due to revert to props.


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