Skip to content
Prev Previous commit
Next Next commit
fix(Twint cfg): improve threading through
  • Loading branch information
lmeyerov committed Sep 5, 2022
commit fadb48e23282f559dabbf67a418248ab2c3e7aad
2 changes: 1 addition & 1 deletion modules/FirehoseJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def search_time_range(self,
if self.save_to_neo:
logger.debug('writing to neo4j')
hydratetic = time.perf_counter()
chkd = TwintPool(is_tor=True).check_hydrate(df)
chkd = (tp or TwintPool(is_tor=True)).check_hydrate(df)
hydratetoc = time.perf_counter()
logger.info(f'finished checking for hydrate: {hydratetoc - hydratetic:0.4f} seconds')
logger.info('search step df shape: %s', df.shape)
Expand Down
4 changes: 2 additions & 2 deletions modules/TwintPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

class TwintPool:

def __init__(self, is_tor=False):
self.config = twint.Config()
def __init__(self, is_tor=False, twint_config=None):
self.config = twint_config or twint.Config()
self.config.Limit = 1000
self.config.Pandas = True
self.config.Hide_output = True
Expand Down