mirror of https://gitee.com/bigwinds/arangodb
using ArangoGlobalContext.h
This commit is contained in:
parent
07411745f9
commit
c78bae8426
|
@ -28,22 +28,17 @@
|
|||
#include "ApplicationFeatures/LoggerFeature.h"
|
||||
#include "ApplicationFeatures/ShutdownFeature.h"
|
||||
#include "ApplicationFeatures/TempFeature.h"
|
||||
#include "Basics/ArangoGlobalContext.h"
|
||||
#include "Benchmark/BenchFeature.h"
|
||||
#include "ProgramOptions2/ProgramOptions.h"
|
||||
#include "Rest/InitializeRest.h"
|
||||
|
||||
using namespace arangodb;
|
||||
using namespace arangodb::application_features;
|
||||
using namespace arangodb::basics;
|
||||
using namespace arangodb::rest;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief main
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
ADB_WindowsEntryFunction();
|
||||
TRIAGENS_REST_INITIALIZE();
|
||||
ArangoGlobalContext context(argc, argv);
|
||||
|
||||
std::shared_ptr<options::ProgramOptions> options(new options::ProgramOptions(
|
||||
argv[0], "Usage: arangob [<options>]", "For more information use:"));
|
||||
|
@ -61,8 +56,5 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
server.run(argc, argv);
|
||||
|
||||
TRIAGENS_REST_SHUTDOWN;
|
||||
ADB_WindowsExitFunction(ret, nullptr);
|
||||
|
||||
return ret;
|
||||
return context.exit(ret);
|
||||
}
|
||||
|
|
|
@ -27,20 +27,15 @@
|
|||
#include "ApplicationFeatures/ConfigFeature.h"
|
||||
#include "ApplicationFeatures/LoggerFeature.h"
|
||||
#include "ApplicationFeatures/ShutdownFeature.h"
|
||||
#include "Basics/ArangoGlobalContext.h"
|
||||
#include "Dump/DumpFeature.h"
|
||||
#include "ProgramOptions2/ProgramOptions.h"
|
||||
#include "Rest/InitializeRest.h"
|
||||
|
||||
using namespace arangodb;
|
||||
using namespace arangodb::application_features;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief main
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
ADB_WindowsEntryFunction();
|
||||
TRIAGENS_REST_INITIALIZE();
|
||||
ArangoGlobalContext context(argc, argv);
|
||||
|
||||
std::shared_ptr<options::ProgramOptions> options(new options::ProgramOptions(
|
||||
argv[0], "Usage: arangodump [<options>]", "For more information use:"));
|
||||
|
@ -57,8 +52,5 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
server.run(argc, argv);
|
||||
|
||||
TRIAGENS_REST_SHUTDOWN;
|
||||
ADB_WindowsExitFunction(ret, nullptr);
|
||||
|
||||
return ret;
|
||||
return context.exit(ret);
|
||||
}
|
||||
|
|
|
@ -28,20 +28,15 @@
|
|||
#include "ApplicationFeatures/LoggerFeature.h"
|
||||
#include "ApplicationFeatures/ShutdownFeature.h"
|
||||
#include "ApplicationFeatures/TempFeature.h"
|
||||
#include "Basics/ArangoGlobalContext.h"
|
||||
#include "Import/ImportFeature.h"
|
||||
#include "ProgramOptions2/ProgramOptions.h"
|
||||
#include "Rest/InitializeRest.h"
|
||||
|
||||
using namespace arangodb;
|
||||
using namespace arangodb::application_features;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief main
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
ADB_WindowsEntryFunction();
|
||||
TRIAGENS_REST_INITIALIZE();
|
||||
ArangoGlobalContext context(argc, argv);
|
||||
|
||||
std::shared_ptr<options::ProgramOptions> options(new options::ProgramOptions(
|
||||
argv[0], "Usage: arangoimp [<options>]", "For more information use:"));
|
||||
|
@ -59,8 +54,5 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
server.run(argc, argv);
|
||||
|
||||
TRIAGENS_REST_SHUTDOWN;
|
||||
ADB_WindowsExitFunction(ret, nullptr);
|
||||
|
||||
return ret;
|
||||
return context.exit(ret);
|
||||
}
|
||||
|
|
|
@ -28,20 +28,15 @@
|
|||
#include "ApplicationFeatures/LoggerFeature.h"
|
||||
#include "ApplicationFeatures/ShutdownFeature.h"
|
||||
#include "ApplicationFeatures/TempFeature.h"
|
||||
#include "Basics/ArangoGlobalContext.h"
|
||||
#include "Restore/RestoreFeature.h"
|
||||
#include "ProgramOptions2/ProgramOptions.h"
|
||||
#include "Rest/InitializeRest.h"
|
||||
|
||||
using namespace arangodb;
|
||||
using namespace arangodb::application_features;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief main
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
ADB_WindowsEntryFunction();
|
||||
TRIAGENS_REST_INITIALIZE();
|
||||
ArangoGlobalContext context(argc, argv);
|
||||
|
||||
std::shared_ptr<options::ProgramOptions> options(new options::ProgramOptions(
|
||||
argv[0], "Usage: arangorestore [<options>]", "For more information use:"));
|
||||
|
@ -59,8 +54,5 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
server.run(argc, argv);
|
||||
|
||||
TRIAGENS_REST_SHUTDOWN;
|
||||
ADB_WindowsExitFunction(ret, nullptr);
|
||||
|
||||
return ret;
|
||||
return context.exit(ret);
|
||||
}
|
||||
|
|
|
@ -31,24 +31,18 @@
|
|||
#include "ApplicationFeatures/ShutdownFeature.h"
|
||||
#include "ApplicationFeatures/TempFeature.h"
|
||||
#include "ApplicationFeatures/V8PlatformFeature.h"
|
||||
#include "Basics/files.h"
|
||||
#include "Basics/ArangoGlobalContext.h"
|
||||
#include "ProgramOptions2/ProgramOptions.h"
|
||||
#include "Rest/InitializeRest.h"
|
||||
#include "Shell/ShellFeature.h"
|
||||
#include "Shell/V8ShellFeature.h"
|
||||
|
||||
using namespace arangodb;
|
||||
using namespace arangodb::application_features;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief main
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
ADB_WindowsEntryFunction();
|
||||
TRIAGENS_REST_INITIALIZE();
|
||||
ArangoGlobalContext context(argc, argv);
|
||||
|
||||
std::string name = TRI_BinaryName(argv[0]);
|
||||
std::string name = context.binaryName();
|
||||
|
||||
std::shared_ptr<options::ProgramOptions> options(new options::ProgramOptions(
|
||||
argv[0], "Usage: " + name + " [<options>]", "For more information use:"));
|
||||
|
@ -70,8 +64,5 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
server.run(argc, argv);
|
||||
|
||||
TRIAGENS_REST_SHUTDOWN;
|
||||
ADB_WindowsExitFunction(ret, nullptr);
|
||||
|
||||
return ret;
|
||||
return context.exit(ret);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue