diff --git a/handler/lib/money.py b/handler/lib/money.py index ffe8208..2d10a66 100644 --- a/handler/lib/money.py +++ b/handler/lib/money.py @@ -68,6 +68,13 @@ class Money(util.Base): self.lc_es_checks.start(delay) self.agora.es = self.es + def write_to_es(self, msgtype, cast): + if settings.ES.Enabled == "1": + cast["type"] = msgtype + cast["ts"] = str(datetime.now().isoformat()) + cast["xtype"] = "tx" + self.es.index(index=settings.ES.Index, document=cast) + def lookup_rates(self, platform, ads, rates=None): """ Lookup the rates for a list of public ads.