From 4e680aabf03750292cb6795c814c4eb80a6b4087 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 20 Nov 2018 14:39:45 +0100 Subject: [PATCH] chg: [Overview] add doc --- OVERVIEW.md | 18 ++++++++++++++++-- bin/SentimentAnalysis.py | 24 +++++++++--------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/OVERVIEW.md b/OVERVIEW.md index 8b324e21..32eae1d8 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -58,10 +58,18 @@ ARDB_DB * DB 5 - TermCred * DB 6 - Tags -* DB 7 - Metadata -* DB 8 - Statistics + ---------------------------------------------------------------------------------------- + + SET - tag paste* + + ---------------------------------------------------------------------------------------- * DB 7 - Metadata: + ---------------------------------------------------------------------------------------- + + SET - 'tag:' + paste tag + + ---------------------------------------------------------------------------------------- ----------------------------------------- BASE64 ---------------------------------------- HSET - 'metadata_hash:'+hash 'saved_path' saved_path @@ -99,3 +107,9 @@ ARDB_DB GET - 'base64_decoded:'+date nd_decoded GET - 'binary_decoded:'+date nd_decoded + +* DB 8 - Statistics +* DB 9 - Onion: + ---------------------------------------------------------------------------------------- + + diff --git a/bin/SentimentAnalysis.py b/bin/SentimentAnalysis.py index 3a014050..1305fb4f 100755 --- a/bin/SentimentAnalysis.py +++ b/bin/SentimentAnalysis.py @@ -45,13 +45,7 @@ cfg = configparser.ConfigParser() cfg.read(configfile) sentiment_lexicon_file = cfg.get("Directories", "sentiment_lexicon_file") -time_clean_sentiment_db = 60*60 - -def clean_db() - sevenDays = oneHour*24*7 - dateStart = datetime.datetime.now() - dateStart = dateStart.replace(minute=0, second=0, microsecond=0) - dateStart_timestamp = calendar.timegm(dateStart.timetuple()) +#time_clean_sentiment_db = 60*60 def Analyse(message, server): path = message @@ -169,14 +163,14 @@ if __name__ == '__main__': while True: message = p.get_from_set() if message is None: - if int(time.time() - time1) > time_clean_sentiment_db: - clean_db() - time1 = time.time() - continue - else: - publisher.debug("{} queue is empty, waiting".format(config_section)) - time.sleep(1) - continue + #if int(time.time() - time1) > time_clean_sentiment_db: + # clean_db() + # time1 = time.time() + # continue + #else: + publisher.debug("{} queue is empty, waiting".format(config_section)) + time.sleep(1) + continue signal.alarm(60) try: Analyse(message, server)