don't store receivedAt and source metadata

This commit is contained in:
Doug Hoyte
2024-08-30 16:51:43 -04:00
parent 21d4e07b87
commit 391f632b73
12 changed files with 18 additions and 30 deletions

View File

@ -59,7 +59,7 @@ struct PluginEventSifter {
std::unique_ptr<RunningPlugin> running;
PluginEventSifterResult acceptEvent(const std::string &pluginCmd, const tao::json::value &evJson, uint64_t receivedAtUs, EventSourceType sourceType, std::string_view sourceInfo, std::string &okMsg) {
PluginEventSifterResult acceptEvent(const std::string &pluginCmd, const tao::json::value &evJson, EventSourceType sourceType, std::string_view sourceInfo, std::string &okMsg) {
if (pluginCmd.size() == 0) {
running.reset();
return PluginEventSifterResult::Accept;
@ -85,7 +85,7 @@ struct PluginEventSifter {
auto request = tao::json::value({
{ "type", "new" },
{ "event", evJson },
{ "receivedAt", receivedAtUs / 1'000'000 },
{ "receivedAt", ::time(nullptr) },
{ "sourceType", eventSourceTypeToStr(sourceType) },
{ "sourceInfo", sourceType == EventSourceType::IP4 || sourceType == EventSourceType::IP6 ? renderIP(sourceInfo) : sourceInfo },
});