Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ STAGE2 = [94, 139, 141, 149]

REPORT_SINCE = datetime(2016, 7, 29)
GOOGLE_MAPS_KEY = 's3cr3t'

WORKER_LOG_PATH = 'worker.log'
5 changes: 3 additions & 2 deletions worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'ACCOUNTS',
'SCAN_RADIUS',
'SCAN_DELAY',
'WORKER_LOG_PATH',
)
for setting_name in REQUIRED_SETTINGS:
if not hasattr(config, setting_name):
Expand All @@ -44,7 +45,7 @@ class CannotProcessStep(Exception):
"""Raised when servers are too busy"""


def configure_logger(filename='worker.log'):
def configure_logger(filename=config.WORKER_LOG_PATH):
logging.basicConfig(
filename=filename,
format=(
Expand Down Expand Up @@ -371,7 +372,7 @@ def parse_args():
if __name__ == '__main__':
args = parse_args()
if args.status_bar:
configure_logger(filename='worker.log')
configure_logger(filename=config.WORKER_LOG_PATH)
logger.info('-' * 30)
logger.info('Starting up!')
else:
Expand Down