Moved helper scripts in their folder + updated import path

pull/23/head
Sami Mokaddem 2017-12-05 09:56:32 +01:00
parent b59827591d
commit bdef0c21e9
7 changed files with 12 additions and 12 deletions

View File

@ -10,7 +10,7 @@ import logging
import redis
import util
import users_helper
from . import users_helper
KEYDAY = "CONTRIB_DAY" # To be used by other module
logging.basicConfig(filename='logs/logs.log', filemode='w', level=logging.INFO)
logger = logging.getLogger(__name__)

View File

@ -5,7 +5,7 @@ import datetime, time
import logging
import util
import contributor_helper
from . import contributor_helper
logging.basicConfig(filename='logs/logs.log', filemode='w', level=logging.INFO)
logger = logging.getLogger(__name__)

View File

@ -11,10 +11,10 @@ import os
import logging
import util
import geo_helper
import contributor_helper
import users_helper
import trendings_helper
from helpers import geo_helper
from helpers import contributor_helper
from helpers import users_helper
from helpers import trendings_helper
configfile = os.path.join(os.environ['DASH_CONFIG'], 'config.cfg')
cfg = configparser.ConfigParser()

View File

@ -13,17 +13,17 @@ import sys
import json
import util
import geo_helper
import contributor_helper
import users_helper
import trendings_helper
from helpers import geo_helper
from helpers import contributor_helper
from helpers import users_helper
from helpers import trendings_helper
configfile = os.path.join(os.environ['DASH_CONFIG'], 'config.cfg')
cfg = configparser.ConfigParser()
cfg.read(configfile)
logging.basicConfig(filename='logs/logs.log', filemode='w', level=logging.INFO)
logger = logging.getLogger(__name__)
logger = logging.getLogger('zmq_dispatcher')
CHANNEL = cfg.get('RedisLog', 'channel')
LISTNAME = cfg.get('RedisLIST', 'listName')

View File

@ -15,7 +15,7 @@ cfg = configparser.ConfigParser()
cfg.read(configfile)
logging.basicConfig(filename='logs/logs.log', filemode='w', level=logging.INFO)
logger = logging.getLogger(__name__)
logger = logging.getLogger('zmq_subscriber')
ZMQ_URL = cfg.get('RedisGlobal', 'zmq_url')
CHANNEL = cfg.get('RedisLog', 'channel')