Skip to content

Commit

Permalink
fix: ignore empty updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Apr 23, 2024
1 parent 8f1ef5c commit 5ad3561
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/clan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ async def raid_weekend_track(clan_tags: List[str], db_client: MongoDatabase, coc
json_data = {"type": "raid_state", "clan_tag": current_raid.clan_tag, "old_raid": previous_raid._raw_data, "raid": current_raid._raw_data}
producer.send("capital", ujson.dumps(json_data).encode("utf-8"), key=clan_tag.encode("utf-8"), timestamp_ms=int(pend.now(tz=pend.UTC).timestamp() * 1000))


await db_client.capital_cache.bulk_write(db_updates, ordered=False)
if db_updates:
await db_client.capital_cache.bulk_write(db_updates, ordered=False)



Expand Down

0 comments on commit 5ad3561

Please sign in to comment.