File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
common/src/main/kotlin/com/lambda/config Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -79,29 +79,20 @@ abstract class Configuration : Jsonable {
7979 private fun tryLoad () {
8080 lambdaScope.launch(Dispatchers .IO ) {
8181 runCatching { load(primary) }
82- .onSuccess {
83- LOG .info(" [IO] Config Manager: ${configName.replaceFirstChar(Char ::titlecase) } } config loaded." )
84- }
85- .onFailure { LOG .error(" Failed to load $configName config, loading backup" , it) }
86- .recoverCatching {
82+ .onSuccess { LOG .info(" [IO] Config Manager: ${configName.replaceFirstChar(Char ::titlecase) } } config loaded." ) }
83+ .onFailure {
84+ LOG .error(" Failed to load $configName config, loading backup" )
8785 runCatching { load(backup) }
8886 .onSuccess { LOG .info(" $configName config loaded from backup" ) }
89- .onFailure {
90- LOG .error(
91- " Failed to load $configName config from backup, unrecoverable error" ,
92- it
93- )
94- }
87+ .onFailure { LOG .error(" Failed to load $configName config from backup, unrecoverable error" , it) }
9588 }
9689 }
9790 }
9891
9992 private fun trySave () {
10093 lambdaScope.launch(Dispatchers .IO ) {
10194 runCatching { save() }
102- .onSuccess {
103- LOG .info(" $configName config saved" )
104- }
95+ .onSuccess { LOG .info(" $configName config saved" ) }
10596 .onFailure { LOG .error(" Failed to save $configName config" , it) }
10697 }
10798 }
You can’t perform that action at this time.
0 commit comments