(cobra2sentry bot) take a sentry client as input instead of a dsn

This commit is contained in:
Benjamin Sergeant
2020-03-12 12:30:58 -07:00
parent adf6aa1d6c
commit d4e1f71e3c
4 changed files with 12 additions and 7 deletions

View File

@ -9,7 +9,6 @@
#include <chrono>
#include <ixcobra/IXCobraConnection.h>
#include <ixsentry/IXSentryClient.h>
#include <spdlog/spdlog.h>
#include <sstream>
#include <thread>
@ -20,7 +19,7 @@ namespace ix
int cobra_to_sentry_bot(const CobraConfig& config,
const std::string& channel,
const std::string& filter,
const std::string& dsn,
SentryClient& sentryClient,
bool verbose,
bool strict,
size_t maxQueueSize,
@ -84,8 +83,7 @@ namespace ix
std::thread t2(heartbeat);
auto sentrySender =
[&queueManager, verbose, &errorSending, &sentCount, &stop, &throttled, &dsn] {
SentryClient sentryClient(dsn);
[&queueManager, verbose, &errorSending, &sentCount, &stop, &throttled, &sentryClient] {
while (true)
{

View File

@ -6,6 +6,7 @@
#pragma once
#include <ixcobra/IXCobraConfig.h>
#include <ixsentry/IXSentryClient.h>
#include <string>
namespace ix
@ -13,7 +14,7 @@ namespace ix
int cobra_to_sentry_bot(const CobraConfig& config,
const std::string& channel,
const std::string& filter,
const std::string& dsn,
SentryClient& sentryClient,
bool verbose,
bool strict,
size_t maxQueueSize,