commit
51d5b56089
|
@ -17,6 +17,7 @@ SET(TD_MQTT FALSE)
|
|||
SET(TD_TSDB_PLUGINS FALSE)
|
||||
SET(TD_STORAGE FALSE)
|
||||
SET(TD_TOPIC FALSE)
|
||||
SET(TD_MODULE FALSE)
|
||||
|
||||
SET(TD_COVER FALSE)
|
||||
SET(TD_MEM_CHECK FALSE)
|
||||
|
|
|
@ -29,6 +29,10 @@ IF (TD_TOPIC)
|
|||
ADD_DEFINITIONS(-D_TOPIC)
|
||||
ENDIF ()
|
||||
|
||||
IF (TD_MODULE)
|
||||
ADD_DEFINITIONS(-D_MODULE)
|
||||
ENDIF ()
|
||||
|
||||
IF (TD_GODLL)
|
||||
ADD_DEFINITIONS(-D_TD_GO_DLL_)
|
||||
ENDIF ()
|
||||
|
|
|
@ -17,6 +17,14 @@ ELSEIF (${TOPIC} MATCHES "false")
|
|||
MESSAGE(STATUS "Build without topic plugins")
|
||||
ENDIF ()
|
||||
|
||||
IF (${TD_MODULE} MATCHES "true")
|
||||
SET(TD_MODULE TRUE)
|
||||
MESSAGE(STATUS "Build with module plugins")
|
||||
ELSEIF (${TOPIC} MATCHES "false")
|
||||
SET(TD_MODULE FALSE)
|
||||
MESSAGE(STATUS "Build without module plugins")
|
||||
ENDIF ()
|
||||
|
||||
IF (${COVER} MATCHES "true")
|
||||
SET(TD_COVER TRUE)
|
||||
MESSAGE(STATUS "Build with test coverage")
|
||||
|
|
|
@ -35,6 +35,10 @@ IF (TD_TOPIC)
|
|||
TARGET_LINK_LIBRARIES(taosd topic)
|
||||
ENDIF ()
|
||||
|
||||
IF (TD_MODULE AND TD_LINUX)
|
||||
TARGET_LINK_LIBRARIES(taosd module dl)
|
||||
ENDIF ()
|
||||
|
||||
SET(PREPARE_ENV_CMD "prepare_env_cmd")
|
||||
SET(PREPARE_ENV_TARGET "prepare_env_target")
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${PREPARE_ENV_CMD}
|
||||
|
|
|
@ -39,6 +39,13 @@
|
|||
#include "dnodeMPeer.h"
|
||||
#include "dnodeShell.h"
|
||||
#include "dnodeTelemetry.h"
|
||||
#include "module.h"
|
||||
|
||||
#if !defined(_MODULE) || !defined(_TD_LINUX)
|
||||
int32_t moduleStart() { return 0; }
|
||||
void moduleStop() {}
|
||||
#endif
|
||||
|
||||
|
||||
void *tsDnodeTmr = NULL;
|
||||
static SRunStatus tsRunStatus = TSDB_RUN_STATUS_STOPPED;
|
||||
|
@ -146,6 +153,7 @@ int32_t dnodeInitSystem() {
|
|||
}
|
||||
|
||||
dnodeSetRunStatus(TSDB_RUN_STATUS_RUNING);
|
||||
moduleStart();
|
||||
|
||||
dnodeReportStep("TDengine", "initialized successfully", 1);
|
||||
dInfo("TDengine is initialized successfully");
|
||||
|
@ -155,6 +163,7 @@ int32_t dnodeInitSystem() {
|
|||
|
||||
void dnodeCleanUpSystem() {
|
||||
if (dnodeGetRunStatus() != TSDB_RUN_STATUS_STOPPED) {
|
||||
moduleStop();
|
||||
dnodeSetRunStatus(TSDB_RUN_STATUS_STOPPED);
|
||||
dnodeCleanupTmr();
|
||||
dnodeCleanupComponents();
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||
*
|
||||
* This program is free software: you can use, redistribute, and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3
|
||||
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TDENGINE_MODULE
|
||||
#define TDENGINE_MODULE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t moduleStart();
|
||||
void moduleStop();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue