1
This commit is contained in:
parent
8329259ad1
commit
15ab670d4a
@ -5,6 +5,7 @@
|
|||||||
#include <a8/udplog.h>
|
#include <a8/udplog.h>
|
||||||
#include <a8/mysql.h>
|
#include <a8/mysql.h>
|
||||||
#include <a8/openssl.h>
|
#include <a8/openssl.h>
|
||||||
|
#include <a8/strutils.h>
|
||||||
|
|
||||||
#include <google/protobuf/message.h>
|
#include <google/protobuf/message.h>
|
||||||
|
|
||||||
@ -351,13 +352,14 @@ namespace f8
|
|||||||
|
|
||||||
bool IsOnlineEnv()
|
bool IsOnlineEnv()
|
||||||
{
|
{
|
||||||
return !getenv("SERVER_ENV");
|
static bool is_online = !getenv("SERVER_ENV");
|
||||||
|
return is_online;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsTestEnv()
|
bool IsTestEnv()
|
||||||
{
|
{
|
||||||
char* env = getenv("SERVER_ENV");
|
static bool is_test = a8::SafeStrCmp(getenv("SERVER_ENV"), "TEST") == 0;
|
||||||
return std::string(env) == "TEST";
|
return is_test;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsValidNormalConfig(a8::XObject& conf, std::vector<std::string> fields)
|
bool IsValidNormalConfig(a8::XObject& conf, std::vector<std::string> fields)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user