streamlined logging a little bit more.
This commit is contained in:
0
kill-chrome.sh
Executable file → Normal file
0
kill-chrome.sh
Executable file → Normal file
2
parser.py
Executable file → Normal file
2
parser.py
Executable file → Normal file
@@ -199,7 +199,7 @@ def main():
|
|||||||
set = load_settings()
|
set = load_settings()
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
log.setLevel(set['loglevel'])
|
log.setLevel(set['loglevel'])
|
||||||
log_format = logging.Formatter('[dw-parser] %(asctime)s - %(levelname)s: %(message)s')
|
log_format = logging.Formatter('%(asctime)s - %(levelname)s: %(message)s')
|
||||||
|
|
||||||
# handler_stdout = logging.StreamHandler(stream="/proc/1/fd/1")
|
# handler_stdout = logging.StreamHandler(stream="/proc/1/fd/1")
|
||||||
# handler_stdout.setLevel(set['loglevel'])
|
# handler_stdout.setLevel(set['loglevel'])
|
||||||
|
|||||||
4
run.sh
4
run.sh
@@ -1,12 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "DW Parser Docker Container started!" > /proc/1/fd/1
|
||||||
|
|
||||||
if ! test -f "/app/conf/crontab"; then
|
if ! test -f "/app/conf/crontab"; then
|
||||||
cp "/app/init/crontab" "/app/conf/crontab"
|
cp "/app/init/crontab" "/app/conf/crontab"
|
||||||
|
echo "Crontab not found... Initialized..." > /proc/1/fd/1
|
||||||
fi
|
fi
|
||||||
crontab "/app/conf/crontab"
|
crontab "/app/conf/crontab"
|
||||||
|
|
||||||
if ! test -f "/app/conf/conf.json"; then
|
if ! test -f "/app/conf/conf.json"; then
|
||||||
cp "/app/init/conf.json" "/app/conf/conf.json"
|
cp "/app/init/conf.json" "/app/conf/conf.json"
|
||||||
|
echo "Conf.json not found... Initialized..." > /proc/1/fd/1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cron -f
|
cron -f
|
||||||
Reference in New Issue
Block a user