unittest working / uses shared_ptr for a bunch of things 🗿
This commit is contained in:
@ -99,7 +99,7 @@ namespace ix
|
||||
void CobraMetricsThreadedPublisher::pushMessage(MessageKind messageKind,
|
||||
const Json::Value& msg)
|
||||
{
|
||||
// Now actually enqueue the task
|
||||
// Enqueue the task
|
||||
{
|
||||
// acquire lock
|
||||
std::unique_lock<std::mutex> lock(_queue_mutex);
|
||||
|
@ -25,7 +25,6 @@ namespace ix
|
||||
~CobraMetricsThreadedPublisher();
|
||||
|
||||
/// Configuration / set keys, etc...
|
||||
/// All input data but the channel name is encrypted with rc4
|
||||
void configure(const std::string& appkey,
|
||||
const std::string& endpoint,
|
||||
const std::string& channel,
|
||||
|
@ -46,9 +46,11 @@ namespace ix
|
||||
std::condition_variable progressCondition;
|
||||
std::queue<Json::Value> queue;
|
||||
|
||||
SentryClient sentryClient(dsn);
|
||||
|
||||
auto sentrySender = [&condition, &progressCondition, &conditionVariableMutex,
|
||||
&queue, verbose, &errorSending, &sentCount,
|
||||
&stop, &dsn]
|
||||
&stop, &sentryClient]
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
@ -62,9 +64,7 @@ namespace ix
|
||||
queue.pop();
|
||||
}
|
||||
|
||||
SentryClient sc(dsn);
|
||||
|
||||
if (!sc.send(msg, verbose))
|
||||
if (!sentryClient.send(msg, verbose))
|
||||
{
|
||||
errorSending = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user