Compare commits

..

2 Commits

2 changed files with 5 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ fullnameOverride: ""
images: images:
owprov: owprov:
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owprov repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owprov
tag: v4.0.0 tag: main
pullPolicy: Always pullPolicy: Always
# regcred: # regcred:
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io # registry: tip-tip-wlan-cloud-ucentral.jfrog.io

View File

@@ -118,6 +118,10 @@ namespace OpenWifi {
Producer.poll((std::chrono::milliseconds) 0); Producer.poll((std::chrono::milliseconds) 0);
} }
} }
if (Queue_.size() == 0) {
// message queue is empty, flush all previously sent messages
Producer.flush();
}
} catch (const cppkafka::HandleException &E) { } catch (const cppkafka::HandleException &E) {
poco_warning(Logger_, poco_warning(Logger_,
fmt::format("Caught a Kafka exception (producer): {}", E.what())); fmt::format("Caught a Kafka exception (producer): {}", E.what()));
@@ -126,10 +130,6 @@ namespace OpenWifi {
} catch (...) { } catch (...) {
poco_error(Logger_, "std::exception"); poco_error(Logger_, "std::exception");
} }
if (Queue_.size() == 0) {
// message queue is empty, flush all previously sent messages
Producer.flush();
}
Note = Queue_.waitDequeueNotification(); Note = Queue_.waitDequeueNotification();
} }
Producer.flush(); Producer.flush();