Skip to content

Commit 7b0cd3d

Browse files
committed
update logger
1 parent 9c703d4 commit 7b0cd3d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

rootfs/etc/periodic/daily/daily-backup

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source /etc/envvars
44

55
# hit local healthcheck to force create new log
6-
curl -s 'http://localhost/healthcheck?cron=daily-backup'
6+
curl -s 'http://127.0.0.1/healthcheck?cron=daily-backup'
77

88
# reload nginx to make sure new log is created
99
/usr/local/openresty/bin/openresty -s reload
@@ -13,9 +13,7 @@ if [[ "$AWS_PATH" != '' ]]; then
1313
LOGDIR="/usr/local/openresty/nginx/logs/*.plog";
1414
COUNTER=0;
1515

16-
# sync all access log files modified more than 2 hours ago
17-
# this mean current date file should not be included if
18-
# you have something correctly hitting health check
16+
# sync all plog files
1917
for line in `ls -t $LOGDIR`
2018
do
2119
#echo $line;
@@ -28,7 +26,7 @@ if [[ "$AWS_PATH" != '' ]]; then
2826

2927
# only process with valid month
3028
if [ ! -z "$MONTH" ]; then
31-
# skip first file found
29+
# skip first file since it's still collecting data
3230
COUNTER=$(expr $COUNTER + 1)
3331
if [ $COUNTER -gt 1 ]; then
3432
s3file=`aws s3 ls s3://$AWS_PATH/year=$YEAR/month=$MONTH/day=$DAY/$file`

rootfs/etc/periodic/weekly/update-geo

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ mv /usr/local/openresty/nginx/logs/error.log /usr/local/openresty/nginx/logs/old
1717
/usr/local/openresty/bin/openresty -s reload
1818

1919
# hit local healthcheck to force create new log
20-
curl -s 'http://localhost/healthcheck?cron=update-geo'
20+
curl -s 'http://127.0.0.1/healthcheck?cron=update-geo'

0 commit comments

Comments
 (0)