mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 00:09:35 +00:00
fix: report to remote not blocking (#11053)
This commit is contained in:
@@ -152,8 +152,7 @@ pub(super) async fn ingest_usages(mut curr_usages: Vec<UsageData>) {
|
||||
let curr_usages = curr_usages.clone();
|
||||
for usage_data in curr_usages {
|
||||
if let Err(e) = super::queues::USAGE_QUEUE
|
||||
.enqueue(ReportingData::Usage(Box::new(usage_data)))
|
||||
.await
|
||||
.try_enqueue(ReportingData::Usage(Box::new(usage_data)))
|
||||
{
|
||||
log::error!(
|
||||
"[SELF-REPORTING] Error in pushing back un-ingested Usage data to UsageQueuer: {e}"
|
||||
@@ -170,8 +169,7 @@ pub(super) async fn ingest_usages(mut curr_usages: Vec<UsageData>) {
|
||||
let curr_usages = curr_usages.clone();
|
||||
for usage_data in curr_usages {
|
||||
if let Err(e) = super::queues::USAGE_QUEUE
|
||||
.enqueue(ReportingData::Usage(Box::new(usage_data)))
|
||||
.await
|
||||
.try_enqueue(ReportingData::Usage(Box::new(usage_data)))
|
||||
{
|
||||
log::error!(
|
||||
"[SELF-REPORTING] Error in pushing back un-ingested Usage data to UsageQueuer: {e}"
|
||||
|
||||
@@ -217,7 +217,7 @@ pub async fn report_request_usage_stats(
|
||||
peak_memory_usage: stats.peak_memory_usage,
|
||||
});
|
||||
if !usage.is_empty() {
|
||||
publish_usage(usage).await;
|
||||
report_usage(usage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user