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/12 12:13:48 UTC

[GitHub] [shardingsphere-elasticjob] terrymanu commented on a change in pull request #1550: Refactor the configuration of error handler

terrymanu commented on a change in pull request #1550:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1550#discussion_r503252824



##########
File path: examples/elasticjob-example-lite-springboot/src/main/resources/application.yml
##########
@@ -31,5 +31,48 @@ elasticjob:
       shardingTotalCount: 9
       props:
         script.command.line: "echo Manual SCRIPT Job: "
+    occurErrorNoticeDingtlakJob:
+      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeDingtlakJob
+      overwrite: true
+      cron: 0/5 * * * * ?
+      shardingTotalCount: 3
+      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+      jobErrorHandlerType: DINGTALK
+      props:
+        dingtalk:
+          webhook: https://oapi.dingtalk.com/robot/send?access_token=42eead064e81ce81fc6af2c107fbe10a4339a3d40a7db8abf5b34d8261527a3f
+          keyword: keyword
+          secret: SEC0b0a6b13b6823b95737dd83491c23adee5d8a7a649899a12217e038eddc84ff4
+          connectTimeout: 3000
+          readTimeout: 5000
+    occurErrorNoticeWechatJob:
+      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeWechatJob
+      overwrite: true
+      cron: 0/5 * * * * ?
+      shardingTotalCount: 3
+      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+      jobErrorHandlerType: WECHAT
+      props:
+        wechat:
+          webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5308e20a-2900-484b-a332-b5bb701ade04
+          connectTimeout: 3000
+          readTimeout: 5000
+#    occurErrorNoticeEmailJob:
+#      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeEmailJob
+#      overwrite: true
+#      cron: 0/5 * * * * ?
+#      shardingTotalCount: 3
+#      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+#      jobErrorHandlerType: EMAIL
+#      props:
+#        email:
+#          host: smtp.163.com

Review comment:
       Please do not use real smtp server, just mask them

##########
File path: examples/elasticjob-example-lite-springboot/src/main/resources/application.yml
##########
@@ -31,5 +31,48 @@ elasticjob:
       shardingTotalCount: 9
       props:
         script.command.line: "echo Manual SCRIPT Job: "
+    occurErrorNoticeDingtlakJob:
+      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeDingtlakJob
+      overwrite: true
+      cron: 0/5 * * * * ?
+      shardingTotalCount: 3
+      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+      jobErrorHandlerType: DINGTALK
+      props:
+        dingtalk:
+          webhook: https://oapi.dingtalk.com/robot/send?access_token=42eead064e81ce81fc6af2c107fbe10a4339a3d40a7db8abf5b34d8261527a3f
+          keyword: keyword
+          secret: SEC0b0a6b13b6823b95737dd83491c23adee5d8a7a649899a12217e038eddc84ff4
+          connectTimeout: 3000
+          readTimeout: 5000
+    occurErrorNoticeWechatJob:
+      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeWechatJob
+      overwrite: true
+      cron: 0/5 * * * * ?
+      shardingTotalCount: 3
+      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+      jobErrorHandlerType: WECHAT
+      props:
+        wechat:
+          webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5308e20a-2900-484b-a332-b5bb701ade04
+          connectTimeout: 3000
+          readTimeout: 5000
+#    occurErrorNoticeEmailJob:
+#      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeEmailJob
+#      overwrite: true
+#      cron: 0/5 * * * * ?
+#      shardingTotalCount: 3
+#      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+#      jobErrorHandlerType: EMAIL
+#      props:
+#        email:
+#          host: smtp.163.com
+#          username: xxx@163.com

Review comment:
       Please mask them too

##########
File path: examples/elasticjob-example-lite-springboot/src/main/resources/application.yml
##########
@@ -31,5 +31,48 @@ elasticjob:
       shardingTotalCount: 9
       props:
         script.command.line: "echo Manual SCRIPT Job: "
+    occurErrorNoticeDingtlakJob:
+      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeDingtlakJob
+      overwrite: true
+      cron: 0/5 * * * * ?
+      shardingTotalCount: 3
+      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+      jobErrorHandlerType: DINGTALK
+      props:
+        dingtalk:
+          webhook: https://oapi.dingtalk.com/robot/send?access_token=42eead064e81ce81fc6af2c107fbe10a4339a3d40a7db8abf5b34d8261527a3f
+          keyword: keyword
+          secret: SEC0b0a6b13b6823b95737dd83491c23adee5d8a7a649899a12217e038eddc84ff4
+          connectTimeout: 3000
+          readTimeout: 5000
+    occurErrorNoticeWechatJob:
+      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeWechatJob
+      overwrite: true
+      cron: 0/5 * * * * ?
+      shardingTotalCount: 3
+      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+      jobErrorHandlerType: WECHAT
+      props:
+        wechat:
+          webhook: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5308e20a-2900-484b-a332-b5bb701ade04
+          connectTimeout: 3000
+          readTimeout: 5000
+#    occurErrorNoticeEmailJob:
+#      elasticJobClass: org.apache.shardingsphere.elasticjob.lite.example.job.SpringBootOccurErrorNoticeEmailJob
+#      overwrite: true
+#      cron: 0/5 * * * * ?
+#      shardingTotalCount: 3
+#      shardingItemParameters: 0=Beijing,1=Shanghai,2=Guangzhou
+#      jobErrorHandlerType: EMAIL
+#      props:
+#        email:
+#          host: smtp.163.com
+#          username: xxx@163.com
+#          password: xxxx
+#          port: 465
+#          useSsl: true
+#          protocol: smtp
+#          form: xxx@163.com
+#          to: xxx1@qq.com,xxx2@qq.com

Review comment:
       Please mask them too




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