Skip to content

Commit

Permalink
Merge pull request #137 from kkaris/src-count-patch
Browse files Browse the repository at this point in the history
Add source count dumping option, run by default
  • Loading branch information
pagreene committed Oct 8, 2020
2 parents 00e24fc + ceb5043 commit 80ea8aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions indra_db/managers/dump_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,17 @@ def __init__(self, db_label='primary', use_principal=False, **kwargs):
self.use_principal = use_principal
super(Sif, self).__init__(db_label, **kwargs)

def dump(self, continuing=False):
def dump(self, continuing=False, include_src_counts=True):
if self.use_principal:
ro = get_db(self.db_label)
else:
ro = get_ro(self.db_label)
s3_path = self.get_s3_path()
dump_sif(s3_path, ro=ro)
if include_src_counts:
srcc = SourceCount()
dump_sif(s3_path, src_count_file=srcc.get_s3_path(), ro=ro)
else:
dump_sif(s3_path, ro=ro)


class Belief(Dumper):
Expand Down

0 comments on commit 80ea8aa

Please sign in to comment.