mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-08-29 13:27:43 +00:00
Remove unnecessary handlers
This commit is contained in:
parent
9ce417c53c
commit
5a96580168
@ -72,20 +72,8 @@ object RecordSetChangeHandler {
|
|||||||
recordChangeRepository
|
recordChangeRepository
|
||||||
)
|
)
|
||||||
changeSet = ChangeSet(completedState.change).complete(completedState.change)
|
changeSet = ChangeSet(completedState.change).complete(completedState.change)
|
||||||
_ <- recordSetRepository.apply(db, changeSet).attempt.map {
|
_ <- recordSetRepository.apply(db, changeSet)
|
||||||
case Left(error: Throwable) =>
|
_ <- recordChangeRepository.save(db, changeSet)
|
||||||
db.rollbackIfActive() //Roll back the changes if error occurs
|
|
||||||
db.close() //Close DB Connection
|
|
||||||
throw error
|
|
||||||
case Right(ok) => ok
|
|
||||||
}
|
|
||||||
_ <- recordChangeRepository.save(db, changeSet).attempt.map {
|
|
||||||
case Left(error: Throwable) =>
|
|
||||||
db.rollbackIfActive() //Roll back the changes if error occurs
|
|
||||||
db.close() //Close DB Connection
|
|
||||||
throw error
|
|
||||||
case Right(ok) => ok
|
|
||||||
}
|
|
||||||
singleBatchChanges <- batchChangeRepository.getSingleChanges(
|
singleBatchChanges <- batchChangeRepository.getSingleChanges(
|
||||||
recordSetChange.singleBatchChangeIds
|
recordSetChange.singleBatchChangeIds
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user