From 079db6f80cebfef73cd86ea509504b4624f3dfb0 Mon Sep 17 00:00:00 2001 From: Starow Date: Mon, 11 Aug 2014 11:33:18 +0200 Subject: [PATCH] Hardcoded path from ZMQ_Curve are now referring correctly in config.cfg.sample fix #6 --- bin/ZMQ_Sub_Curve.py | 6 +++++- bin/packages/config.cfg.sample | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/ZMQ_Sub_Curve.py b/bin/ZMQ_Sub_Curve.py index ad1236f1..824726e0 100755 --- a/bin/ZMQ_Sub_Curve.py +++ b/bin/ZMQ_Sub_Curve.py @@ -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) diff --git a/bin/packages/config.cfg.sample b/bin/packages/config.cfg.sample index 0d5881e0..30e6e4b1 100644 --- a/bin/packages/config.cfg.sample +++ b/bin/packages/config.cfg.sample @@ -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]