mirror of https://github.com/citusdata/citus.git
Properly use #ifdef HAVE_LIBCURL.
parent
01353cb7cb
commit
2aec6eda49
|
@ -796,7 +796,7 @@ RegisterCitusConfigVariables(void)
|
|||
"and operating system name. This configuration value controls "
|
||||
"whether these reports are sent."),
|
||||
&EnableStatisticsCollection,
|
||||
#if HAVE_LIBCURL
|
||||
#ifdef HAVE_LIBCURL
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
|
@ -892,7 +892,7 @@ NormalizeWorkerListPath(void)
|
|||
static bool
|
||||
StatisticsCollectionGucCheckHook(bool *newval, void **extra, GucSource source)
|
||||
{
|
||||
#if HAVE_LIBCURL
|
||||
#ifdef HAVE_LIBCURL
|
||||
return true;
|
||||
#else
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "access/xact.h"
|
||||
#include "catalog/pg_extension.h"
|
||||
#include "citus_version.h"
|
||||
#include "commands/extension.h"
|
||||
#include "libpq/pqsignal.h"
|
||||
#include "catalog/namespace.h"
|
||||
|
@ -312,7 +313,7 @@ CitusMaintenanceDaemonMain(Datum main_arg)
|
|||
(prevStatsCollectionFailed &&
|
||||
secondsSincePrevStatsCollection >= STATISTICS_COLLECTION_RETRY_INTERVAL))
|
||||
{
|
||||
#if HAVE_LIBCURL
|
||||
#ifdef HAVE_LIBCURL
|
||||
if (EnableStatisticsCollection)
|
||||
{
|
||||
MemoryContext statsCollectionContext =
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "citus_version.h"
|
||||
|
||||
bool EnableStatisticsCollection = true; /* send basic usage statistics to Citus */
|
||||
|
||||
#ifdef HAVE_LIBCURL
|
||||
|
@ -18,7 +20,6 @@ bool EnableStatisticsCollection = true; /* send basic usage statistics to Citus
|
|||
#include <sys/utsname.h>
|
||||
|
||||
#include "access/xact.h"
|
||||
#include "citus_version.h"
|
||||
#include "distributed/metadata_cache.h"
|
||||
#include "distributed/statistics_collection.h"
|
||||
#include "distributed/worker_manager.h"
|
||||
|
|
|
@ -10,10 +10,12 @@
|
|||
#ifndef STATISTICS_COLLECTION_H
|
||||
#define STATISTICS_COLLECTION_H
|
||||
|
||||
#include "citus_version.h"
|
||||
|
||||
/* Config variables managed via guc.c */
|
||||
extern bool EnableStatisticsCollection;
|
||||
|
||||
#if HAVE_LIBCURL
|
||||
#ifdef HAVE_LIBCURL
|
||||
|
||||
#define STATS_COLLECTION_HOST "https://citus-statistics.herokuapp.com"
|
||||
#define HTTP_TIMEOUT_SECONDS 5
|
||||
|
|
Loading…
Reference in New Issue