1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

Batch CommunityGoal events

This commit is contained in:
Jonathan Harris 2018-01-02 18:40:20 +00:00
parent 720a83db36
commit 17c24fee81

View File

@ -318,10 +318,10 @@ def worker():
# Whether any of the entries should be sent immediately
def should_send(entries):
for entry in entries:
# Skip entries that will be soon followed by a 'Docked' event
if (entry['event'] not in ['Cargo', 'Loadout', 'Materials', 'LoadGame', 'Rank', 'Progress',
'ShipyardBuy', 'ShipyardNew', 'ShipyardSwap'] and
not (entry['event'] == 'Location' and entry.get('Docked'))):
if (entry['event'] not in ['CommunityGoal', # Spammed periodically
'Cargo', 'Loadout', 'Materials', 'LoadGame', 'Rank', 'Progress', # Will be followed by 'Docked'
'ShipyardBuy', 'ShipyardNew', 'ShipyardSwap'] and # "
not (entry['event'] == 'Location' and entry.get('Docked'))): # "
return True
return False