Page MenuHomePhabricator

phabricator 'compact' transaction phid storage

Authored By
mmodell
Mar 16 2018, 1:45 AM
Size
715 B
Referenced Files
None
Subscribers
None

phabricator 'compact' transaction phid storage

def compute_edge_phids_from_transactions(transactions, edgetype):
final_phids = {}
for trns in transactions:
try:
metadata = json.loads(trns[9])
if "edge:type" in metadata.keys() and metadata[
"edge:type"] is edgetype:
# removed phids:
phids = json.loads(trns[7])
for phid in phids:
final_phids.setdefault(phid, False)
# added phids:
phids = json.loads(trns[8])
for phid in phids:
final_phids.setdefault(phid, True)
except:
pass
return [key for key, val in final_phids.items() if val is True]

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5637971
Default Alt Text
phabricator 'compact' transaction phid storage (715 B)

Event Timeline