feat(Core/Updater): Add configurable shutdown delay on update exceptions (#23042)
This commit is contained in:
parent
a0a8187ea4
commit
dbd4aaf065
2 changed files with 13 additions and 0 deletions
|
|
@ -518,7 +518,12 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
|
|||
path.generic_string(), pool.GetConnectionInfo()->database);
|
||||
|
||||
if (!sConfigMgr->isDryRun())
|
||||
{
|
||||
if (uint32 delay = sConfigMgr->GetOption<uint32>("Updates.ExceptionShutdownDelay", 10000))
|
||||
std::this_thread::sleep_for(Milliseconds(delay));
|
||||
|
||||
throw UpdateException("update failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue