Simplify cast for writing to ES

This commit is contained in:
Mark Veidemanis 2022-05-09 08:02:38 +01:00
parent df5ea51226
commit b41f2b8f7f
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 4 additions and 4 deletions

View File

@ -436,11 +436,11 @@ class Local(util.Base):
"asset": ad[4], "asset": ad[4],
"currency": ad[5], "currency": ad[5],
"margin": ad[6], "margin": ad[6],
"type": msgtype,
"ts": str(datetime.now().isoformat()),
"xtype": "platform",
"market": self.platform,
} }
cast["type"] = msgtype
cast["ts"] = str(datetime.now().isoformat())
cast["xtype"] = "platorm"
cast["market"] = self.platform
self.es.index(index=settings.ES.MetaIndex, document=cast) self.es.index(index=settings.ES.MetaIndex, document=cast)
@inlineCallbacks @inlineCallbacks