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