Hardcoded path from ZMQ_Curve are now referring correctly in config.cfg.sample fix #6

pull/11/head
Starow 2014-08-11 11:33:18 +02:00
parent 30640ab3c6
commit 079db6f80c
2 changed files with 7 additions and 1 deletions

View File

@ -74,6 +74,10 @@ def main():
# FUNCTIONS #
publisher.info("Script Curve subscribed to channel {0}".format(cfg.get("PubSub_Words", "channel_0")))
# FILE CURVE SECTION #
csv_path = cfg.get("Directories", "wordtrending_csv")
wordfile_path = cfg.get("Directories", "wordsfile")
paste_words = []
message = Sub.get_msg_from_queue(r_serv)
prec_filename = None
@ -82,7 +86,7 @@ def main():
channel, filename, word, score = message.split()
if prec_filename == None or filename != prec_filename:
PST = P.Paste(filename)
lib_words.create_curve_with_word_file(r_serv1, "/home/user/AIL/var/www/static/csv/wordstrendingdata", "/home/user/AIL/files/wordfile", int(PST.p_date.year), int(PST.p_date.month))
lib_words.create_curve_with_word_file(r_serv1, csv_path, wordfile_path, int(PST.p_date.year), int(PST.p_date.month))
prec_filename = filename
prev_score = r_serv1.hget(word.lower(), PST.p_date)

View File

@ -1,6 +1,8 @@
[Directories]
bloomfilters = /home/user/Blooms/
pastes = /home/user/PASTES/
wordtrending_csv = /home/user/AIL/var/www/static/csv/wordstrendingdata
wordsfile = /home/user/AIL/files/wordfile
##### Redis #####
[Redis_Cache]