remove webAPIHeartbeat properly

This commit is contained in:
DarthArgus
2018-06-03 13:52:48 -05:00
parent cf82ce9dc5
commit b5d6073b19
9 changed files with 0 additions and 96 deletions
@@ -12,18 +12,10 @@
#include "sharedRandom/SetupSharedRandom.h"
#include "sharedThread/SetupSharedThread.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
int main(int argc, char ** argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);
@@ -12,10 +12,6 @@
#include "sharedRandom/SetupSharedRandom.h"
#include "sharedThread/SetupSharedThread.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
void dumpPid(const char * argv)
@@ -29,10 +25,6 @@ void dumpPid(const char * argv)
int main(int argc, char ** argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);
@@ -17,17 +17,10 @@
#include "sharedNetworkMessages/SetupSharedNetworkMessages.h"
#include "sharedThread/SetupSharedThread.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
int main(int argc, char **argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);
@@ -14,10 +14,6 @@
#include "sharedThread/SetupSharedThread.h"
#include "sharedUtility/SetupSharedUtility.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
void dumpPid(const char * argv)
@@ -31,10 +27,6 @@ void dumpPid(const char * argv)
int main(int argc, char ** argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
// dumpPid(argv[0]);
SetupSharedThread::install();
-2
View File
@@ -6,8 +6,6 @@ add_library(webAPI
webAPI.h
webAPI.cpp
json.hpp
webAPIHeartbeat.h
webAPIHeartbeat.cpp
)
include_directories(
-14
View File
@@ -1,14 +0,0 @@
//
// Created by Darth on 10/17/2016.
//
#include "webAPIHeartbeat.h"
using namespace StellaBellum;
webAPIHeartbeat::webAPIHeartbeat() {
webAPI api(std::string("https://login.stellabellum.net/metric/shoulderTap"), std::string("StellaBellum WebAPI Metrics Sender"));
api.addJsonData<std::string>(std::string("type"), std::string("server"));
api.submit();
}
-35
View File
@@ -1,35 +0,0 @@
//
// Created by Darth on 10/17/2016.
//
#ifndef webAPIHeartbeat_H
#define webAPIHeartbeat_H
#include <cstdio>
#include <unistd.h>
#include <limits.h>
#include <libgen.h>
#include <signal.h>
#include "webAPI.h"
namespace StellaBellum {
class webAPIHeartbeat {
public:
webAPIHeartbeat();
private:
const inline std::string get_selfpath() {
char buff[PATH_MAX];
ssize_t len = ::readlink("/proc/self/exe", buff, sizeof(buff) - 1);
if (len != -1) {
buff[len] = '\0';
return std::string(buff);
}
return std::string();
}
};
}
#endif //webAPIHeartbeat_H
@@ -19,10 +19,6 @@
#include "swgSharedNetworkMessages/SetupSwgSharedNetworkMessages.h"
#include "swgServerNetworkMessages/SetupSwgServerNetworkMessages.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
void dumpPid(const char * argv)
@@ -38,10 +34,6 @@ int main(int argc, char ** argv)
{
// dumpPid(argv[0]);
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);
@@ -32,16 +32,10 @@
#include "swgSharedNetworkMessages/SetupSwgSharedNetworkMessages.h"
#include "swgServerNetworkMessages/SetupSwgServerNetworkMessages.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
int main(int argc, char ** argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);