Commit 6d8772c3 authored by Philippe Luchansky's avatar Philippe Luchansky Committed by Francesco Poldi

conditionally store tweets in a specified object if it exists (#463)

parent d60567f3
......@@ -37,6 +37,7 @@ class Config:
User_full = False
Profile_full = False
Store_object = False
Store_object_tweets_list = None
Pandas_type = None
Pandas = False
Index_tweets = "twinttweets"
......
......@@ -125,7 +125,10 @@ async def checkData(tweet, config, conn):
if config.Store_object:
logme.debug(__name__+':checkData:Store_object')
tweets_object.append(tweet)
if hasattr(config.Store_object_tweets_list, 'append'):
config.Store_object_tweets_list.append(tweet)
else:
tweets_object.append(tweet)
if config.Elasticsearch:
logme.debug(__name__+':checkData:Elasticsearch')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment