Commit 6c60bd03 authored by 赵威's avatar 赵威

add try

parent 30105256
...@@ -45,7 +45,6 @@ object Main extends LazyLogging { ...@@ -45,7 +45,6 @@ object Main extends LazyLogging {
"172.16.44.25:9092,172.16.44.31:9092,172.16.44.45:9092" "172.16.44.25:9092,172.16.44.31:9092,172.16.44.45:9092"
) )
// TODO remove test
val kafkaConsumer = new FlinkKafkaConsumer[UserInfo]( val kafkaConsumer = new FlinkKafkaConsumer[UserInfo](
"gm-portrait-update-device", "gm-portrait-update-device",
new UserInfoDeserializationSchema, new UserInfoDeserializationSchema,
......
...@@ -13,7 +13,8 @@ object DingTalk { ...@@ -13,7 +13,8 @@ object DingTalk {
msg: Map[String, String], msg: Map[String, String],
contentType: String = "msg", contentType: String = "msg",
mobiles: List[String] = List.empty[String] mobiles: List[String] = List.empty[String]
): Unit = { ): Unit =
try {
val url = mkUrl(contentType) val url = mkUrl(contentType)
val builder = StringBuilder.newBuilder val builder = StringBuilder.newBuilder
builder.append("StreamingUserPortrait:\n") builder.append("StreamingUserPortrait:\n")
...@@ -26,6 +27,8 @@ object DingTalk { ...@@ -26,6 +27,8 @@ object DingTalk {
} }
makeRequest(builder.toString, contentType) makeRequest(builder.toString, contentType)
} catch {
case e: Throwable => e.printStackTrace()
} }
def makeRequest(msg: String, contentType: String): Unit = def makeRequest(msg: String, contentType: String): Unit =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment