mirror of
https://github.com/Xahau/xahaud.git
synced 2026-06-02 16:26:37 +00:00
Require a message on "Application::signalStop" (#5255)
This change adds a message parameter to Application::signalStop for extra context.
This commit is contained in:
@@ -96,7 +96,7 @@ Env::AppBundle::~AppBundle()
|
||||
if (app)
|
||||
{
|
||||
app->getJobQueue().rendezvous();
|
||||
app->signalStop();
|
||||
app->signalStop("~AppBundle");
|
||||
}
|
||||
if (thread.joinable())
|
||||
thread.join();
|
||||
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
config_->CONFIG_DIR),
|
||||
*this,
|
||||
logs_->journal("PerfLog"),
|
||||
[this] { signalStop(); }))
|
||||
[this] { signalStop("PerfLog"); }))
|
||||
|
||||
, m_txMaster(*this)
|
||||
|
||||
@@ -508,7 +508,7 @@ public:
|
||||
void
|
||||
run() override;
|
||||
void
|
||||
signalStop(std::string msg = "") override;
|
||||
signalStop(std::string msg) override;
|
||||
bool
|
||||
checkSigs() const override;
|
||||
void
|
||||
@@ -980,7 +980,7 @@ public:
|
||||
if (!config_->standalone() &&
|
||||
!getRelationalDatabase().transactionDbHasSpace(*config_))
|
||||
{
|
||||
signalStop();
|
||||
signalStop("Out of transaction DB space");
|
||||
}
|
||||
|
||||
// VFALCO NOTE Does the order of calls matter?
|
||||
@@ -1200,7 +1200,7 @@ ApplicationImp::setup(boost::program_options::variables_map const& cmdline)
|
||||
JLOG(m_journal.info()) << "Received signal " << signum;
|
||||
|
||||
if (signum == SIGTERM || signum == SIGINT)
|
||||
signalStop();
|
||||
signalStop("Signal: " + to_string(signum));
|
||||
});
|
||||
|
||||
auto debug_log = config_->getDebugLogFile();
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
virtual void
|
||||
run() = 0;
|
||||
virtual void
|
||||
signalStop(std::string msg = "") = 0;
|
||||
signalStop(std::string msg) = 0;
|
||||
virtual bool
|
||||
checkSigs() const = 0;
|
||||
virtual void
|
||||
|
||||
@@ -31,7 +31,7 @@ struct JsonContext;
|
||||
Json::Value
|
||||
doStop(RPC::JsonContext& context)
|
||||
{
|
||||
context.app.signalStop();
|
||||
context.app.signalStop("RPC");
|
||||
return RPC::makeObjectValue(systemName() + " server stopping");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user