|
|
@ -21,7 +21,6 @@ import org.apache.dolphinscheduler.spi.alert.AlertChannel; |
|
|
|
import org.apache.dolphinscheduler.spi.alert.AlertData; |
|
|
|
import org.apache.dolphinscheduler.spi.alert.AlertData; |
|
|
|
import org.apache.dolphinscheduler.spi.alert.AlertInfo; |
|
|
|
import org.apache.dolphinscheduler.spi.alert.AlertInfo; |
|
|
|
import org.apache.dolphinscheduler.spi.alert.AlertResult; |
|
|
|
import org.apache.dolphinscheduler.spi.alert.AlertResult; |
|
|
|
import org.apache.dolphinscheduler.spi.params.PluginParamsTransfer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
@ -30,8 +29,10 @@ public class FeiShuAlertChannel implements AlertChannel { |
|
|
|
public AlertResult process(AlertInfo alertInfo) { |
|
|
|
public AlertResult process(AlertInfo alertInfo) { |
|
|
|
|
|
|
|
|
|
|
|
AlertData alertData = alertInfo.getAlertData(); |
|
|
|
AlertData alertData = alertInfo.getAlertData(); |
|
|
|
String alertParams = alertInfo.getAlertParams(); |
|
|
|
Map<String, String> paramsMap = alertInfo.getAlertParams(); |
|
|
|
Map<String, String> paramsMap = PluginParamsTransfer.getPluginParamsMap(alertParams); |
|
|
|
if (null == paramsMap) { |
|
|
|
|
|
|
|
return new AlertResult("false", "fei shu params is null"); |
|
|
|
|
|
|
|
} |
|
|
|
return new FeiShuSender(paramsMap).sendFeiShuMsg(alertData); |
|
|
|
return new FeiShuSender(paramsMap).sendFeiShuMsg(alertData); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|