mirror of https://gitee.com/bigwinds/arangodb
Let bootstrap feature publish its readiness.
This commit is contained in:
parent
e3bfe6ec76
commit
9b8f9f22e9
|
@ -40,7 +40,7 @@ using namespace arangodb::application_features;
|
|||
using namespace arangodb::options;
|
||||
|
||||
BootstrapFeature::BootstrapFeature(application_features::ApplicationServer* server)
|
||||
: ApplicationFeature(server, "Bootstrap") {
|
||||
: ApplicationFeature(server, "Bootstrap"), _isReady(false) {
|
||||
startsAfter("Dispatcher");
|
||||
startsAfter("Endpoint");
|
||||
startsAfter("Scheduler");
|
||||
|
@ -148,6 +148,8 @@ void BootstrapFeature::start() {
|
|||
arangodb::rest::HttpHandlerFactory::setMaintenance(false);
|
||||
LOG(INFO) << "ArangoDB (version " << ARANGODB_VERSION_FULL
|
||||
<< ") is ready for business. Have fun!";
|
||||
|
||||
_isReady = true;
|
||||
}
|
||||
|
||||
void BootstrapFeature::stop() {
|
||||
|
|
|
@ -33,6 +33,12 @@ class BootstrapFeature final : public application_features::ApplicationFeature {
|
|||
public:
|
||||
void start() override final;
|
||||
void stop() override final;
|
||||
bool isReady() const {
|
||||
return _isReady;
|
||||
}
|
||||
|
||||
private:
|
||||
bool _isReady;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue