Check that EDShipyard and Coriolis links shouldn't be discarded

This commit is contained in:
Jonathan Harris committed 2018-01-27 17:51:00 +00:00
1 parent d014750e6d
commit bca3d63ffe
1 file changed
+9 -7
+9 -7
View File
@@ -254,12 +254,14 @@ def cmdr_data(data, is_beta):
if ship != this.lastship:
cmdr = data['commander']['name']
timestamp = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
this.queue.put((cmdr, {
'event': 'Coriolis', 'timestamp': timestamp, '_shipId': data['ship']['id'], 'url': coriolis.url(data, is_beta)
}))
this.queue.put((cmdr, {
'event': 'EDShipyard', 'timestamp': timestamp, '_shipId': data['ship']['id'], 'url': edshipyard.url(data, is_beta)
}))
if 'Coriolis' not in this.discardedEvents:
this.queue.put((cmdr, {
'event': 'Coriolis', 'timestamp': timestamp, '_shipId': data['ship']['id'], 'url': coriolis.url(data, is_beta)
}))
if 'EDShipyard' not in this.discardedEvents:
this.queue.put((cmdr, {
'event': 'EDShipyard', 'timestamp': timestamp, '_shipId': data['ship']['id'], 'url': edshipyard.url(data, is_beta)
}))
this.lastship = ship
@@ -332,7 +334,7 @@ def worker():
def should_send(entries):
for entry in entries:
if (entry['event'] not in ['CommunityGoal', # Spammed periodically
'Cargo', 'Loadout', 'Materials', 'LoadGame', 'Rank', 'Progress', # Will be followed by 'Docked'
'Cargo', 'Loadout', 'Materials', 'LoadGame', 'Rank', 'Progress', # Will be followed by 'Docked' or 'Location'
'ShipyardBuy', 'ShipyardNew', 'ShipyardSwap'] and # "
not (entry['event'] == 'Location' and entry.get('Docked'))): # "
return True