mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 01:37:17 +00:00
Update config
Make all paths in the config file relative to the home directory.
This commit is contained in:
parent
a68f5b6a0e
commit
50cfac857e
5 changed files with 12 additions and 9 deletions
|
@ -67,7 +67,7 @@ if __name__ == "__main__":
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
continue
|
continue
|
||||||
# Creating the full filepath
|
# Creating the full filepath
|
||||||
filename = os.path.join(os.environ('AIL_BIN'),
|
filename = os.path.join(os.environ('AIL_HOME'),
|
||||||
h.config.get("Directories", "pastes"), paste)
|
h.config.get("Directories", "pastes"), paste)
|
||||||
dirname = os.path.dirname(filename)
|
dirname = os.path.dirname(filename)
|
||||||
if not os.path.exists(dirname):
|
if not os.path.exists(dirname):
|
||||||
|
|
|
@ -27,6 +27,7 @@ import time
|
||||||
from packages import Paste
|
from packages import Paste
|
||||||
from pubsublogger import publisher
|
from pubsublogger import publisher
|
||||||
from packages import lib_words
|
from packages import lib_words
|
||||||
|
import os
|
||||||
|
|
||||||
import Helper
|
import Helper
|
||||||
|
|
||||||
|
@ -52,8 +53,10 @@ if __name__ == "__main__":
|
||||||
publisher.info("Script Curve subscribed to {}".format(h.sub_channel))
|
publisher.info("Script Curve subscribed to {}".format(h.sub_channel))
|
||||||
|
|
||||||
# FILE CURVE SECTION #
|
# FILE CURVE SECTION #
|
||||||
csv_path = h.config.get("Directories", "wordtrending_csv")
|
csv_path = os.path.join(os.environ('AIL_HOME'),
|
||||||
wordfile_path = h.config.get("Directories", "wordsfile")
|
h.config.get("Directories", "wordtrending_csv"))
|
||||||
|
wordfile_path = os.path.join(os.environ('AIL_HOME'),
|
||||||
|
h.config.get("Directories", "wordsfile"))
|
||||||
|
|
||||||
message = h.redis_rpop()
|
message = h.redis_rpop()
|
||||||
prec_filename = None
|
prec_filename = None
|
||||||
|
|
|
@ -54,7 +54,7 @@ if __name__ == "__main__":
|
||||||
h.config.get("PubSub_Global", "channel")))
|
h.config.get("PubSub_Global", "channel")))
|
||||||
|
|
||||||
set_limit = 100
|
set_limit = 100
|
||||||
bloompath = os.path.join(os.environ('AIL_BIN'),
|
bloompath = os.path.join(os.environ('AIL_HOME'),
|
||||||
h.config.get("Directories", "bloomfilters"))
|
h.config.get("Directories", "bloomfilters"))
|
||||||
|
|
||||||
bloop_path_set = set()
|
bloop_path_set = set()
|
||||||
|
|
|
@ -27,7 +27,7 @@ cfg = ConfigParser.ConfigParser()
|
||||||
cfg.read(configfile)
|
cfg.read(configfile)
|
||||||
|
|
||||||
# Indexer configuration - index dir and schema setup
|
# Indexer configuration - index dir and schema setup
|
||||||
indexpath = cfg.get("Indexer", "path")
|
indexpath = os.path.join(os.environ('AIL_HOME'), cfg.get("Indexer", "path"))
|
||||||
indexertype = cfg.get("Indexer", "type")
|
indexertype = cfg.get("Indexer", "type")
|
||||||
|
|
||||||
argParser = argparse.ArgumentParser(description='Fulltext search for AIL')
|
argParser = argparse.ArgumentParser(description='Fulltext search for AIL')
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[Directories]
|
[Directories]
|
||||||
bloomfilters = /home/user/Blooms/
|
bloomfilters = Blooms
|
||||||
pastes = PASTES
|
pastes = PASTES
|
||||||
wordtrending_csv = /home/user/AIL/var/www/static/csv/wordstrendingdata
|
wordtrending_csv = var/www/static/csv/wordstrendingdata
|
||||||
wordsfile = /home/user/AIL/files/wordfile
|
wordsfile = files/wordfile
|
||||||
|
|
||||||
##### Redis #####
|
##### Redis #####
|
||||||
[Redis_Cache]
|
[Redis_Cache]
|
||||||
|
@ -70,4 +70,4 @@ cc_critical = DE
|
||||||
# Indexer configuration
|
# Indexer configuration
|
||||||
[Indexer]
|
[Indexer]
|
||||||
type = whoosh
|
type = whoosh
|
||||||
path = /home/user/indexdir
|
path = indexdir
|
||||||
|
|
Loading…
Reference in a new issue