Commit d849ca0b authored by 赵威's avatar 赵威

save msg

parent 39714577
......@@ -46,7 +46,7 @@ object Main extends LazyLogging {
)
val kafkaConsumer = new FlinkKafkaConsumer[UserInfo](
"gm-portrait-update-device",
"gm-portrait-update-device-test",
new UserInfoDeserializationSchema,
kafkaConsumerProperties
)
......
......@@ -67,7 +67,8 @@ object Redis {
def saveServiceDiary(
contentEitherFuture: Either[Throwable, Future[IndexedSeq[Content]]],
deviceId: String
): Unit = {
): Unit =
try {
implicit val formats = Serialization.formats(NoTypeHints)
val key = s"streaming:candidate:service_diary:device_id:${deviceId}"
......@@ -85,5 +86,11 @@ object Redis {
}
}
}
} catch {
case e: Throwable =>
DingTalk.send(
Map("method" -> "Redis.saveServiceDiary", "error" -> e.getStackTrace.mkString("\n")),
contentType = "exception"
)
}
}
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