mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
chg: [Overview] add doc
This commit is contained in:
parent
108fdb868e
commit
4e680aabf0
2 changed files with 25 additions and 17 deletions
18
OVERVIEW.md
18
OVERVIEW.md
|
@ -58,10 +58,18 @@ ARDB_DB
|
||||||
|
|
||||||
* DB 5 - TermCred
|
* DB 5 - TermCred
|
||||||
* DB 6 - Tags
|
* DB 6 - Tags
|
||||||
* DB 7 - Metadata
|
----------------------------------------------------------------------------------------
|
||||||
* DB 8 - Statistics
|
|
||||||
|
SET - tag paste*
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
* DB 7 - Metadata:
|
* DB 7 - Metadata:
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SET - 'tag:' + paste tag
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
----------------------------------------- BASE64 ----------------------------------------
|
----------------------------------------- BASE64 ----------------------------------------
|
||||||
|
|
||||||
HSET - 'metadata_hash:'+hash 'saved_path' saved_path
|
HSET - 'metadata_hash:'+hash 'saved_path' saved_path
|
||||||
|
@ -99,3 +107,9 @@ ARDB_DB
|
||||||
|
|
||||||
GET - 'base64_decoded:'+date nd_decoded
|
GET - 'base64_decoded:'+date nd_decoded
|
||||||
GET - 'binary_decoded:'+date nd_decoded
|
GET - 'binary_decoded:'+date nd_decoded
|
||||||
|
|
||||||
|
* DB 8 - Statistics
|
||||||
|
* DB 9 - Onion:
|
||||||
|
----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,13 +45,7 @@ cfg = configparser.ConfigParser()
|
||||||
cfg.read(configfile)
|
cfg.read(configfile)
|
||||||
|
|
||||||
sentiment_lexicon_file = cfg.get("Directories", "sentiment_lexicon_file")
|
sentiment_lexicon_file = cfg.get("Directories", "sentiment_lexicon_file")
|
||||||
time_clean_sentiment_db = 60*60
|
#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())
|
|
||||||
|
|
||||||
def Analyse(message, server):
|
def Analyse(message, server):
|
||||||
path = message
|
path = message
|
||||||
|
@ -169,11 +163,11 @@ if __name__ == '__main__':
|
||||||
while True:
|
while True:
|
||||||
message = p.get_from_set()
|
message = p.get_from_set()
|
||||||
if message is None:
|
if message is None:
|
||||||
if int(time.time() - time1) > time_clean_sentiment_db:
|
#if int(time.time() - time1) > time_clean_sentiment_db:
|
||||||
clean_db()
|
# clean_db()
|
||||||
time1 = time.time()
|
# time1 = time.time()
|
||||||
continue
|
# continue
|
||||||
else:
|
#else:
|
||||||
publisher.debug("{} queue is empty, waiting".format(config_section))
|
publisher.debug("{} queue is empty, waiting".format(config_section))
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue