Skip to content

Commit

Permalink
[#140] refactor: 슬랙 알림 채널 추가(verbose)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuHyun419 committed Sep 10, 2022
1 parent 89f6238 commit ae2adcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/com/yapp/web2/infra/slack/SlackService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ package com.yapp.web2.infra.slack
interface SlackService {
fun sendSlackAlarm(text: String)

fun sendSlackAlarmToVerbose(text: String)

fun sendSlackAlarm(channel: String, text: String)
}
8 changes: 8 additions & 0 deletions src/main/kotlin/com/yapp/web2/infra/slack/SlackServiceImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ class SlackServiceImpl : SlackService {
@Value("\${slack.monitor.channel.id}")
lateinit var defaultChannel: String

@Value("\${slack.verbose.channel.id}")
lateinit var verboseChannel: String

override fun sendSlackAlarm(text: String) {
sendSlackAlarm(defaultChannel, text)
}

override fun sendSlackAlarmToVerbose(text: String) {
sendSlackAlarm(verboseChannel, text)
}

/**
* Send Slack Alarm
*/
Expand All @@ -37,6 +44,7 @@ class SlackServiceImpl : SlackService {
}
}


/**
* Slack Channel name, id list
*/
Expand Down

0 comments on commit ae2adcf

Please sign in to comment.