Skip to content

Commit

Permalink
Merge pull request #82 from PiotrIw/fix_image
Browse files Browse the repository at this point in the history
v1.2.10
  • Loading branch information
PiotrIw authored Apr 29, 2024
2 parents 26ac74a + 347d482 commit a257d55
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .contrib/docker/Dockerfile.web
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is Dockerfile for development purposes only.
ARG PYTHON_VERSION='3.10'
ARG PYTHON_VERSION='3.10.14'
FROM python:${PYTHON_VERSION}-slim
RUN mkdir /code /code/production
WORKDIR /code
Expand Down
2 changes: 1 addition & 1 deletion .contrib/docker/Dockerfile.web.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is Dockerfile for production
ARG PYTHON_VERSION='3.10'
ARG PYTHON_VERSION='3.10.14'
FROM python:${PYTHON_VERSION}-slim
RUN mkdir /code /code/production
WORKDIR /code
Expand Down
7 changes: 6 additions & 1 deletion .contrib/docker/cron/run_locked.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

echo "run_locked started at $(date) with parameters: $@"

if [ -z "$2" ]; then
echo Usage: $0 lock_name [max_ok_delay] command...
exit 1
Expand All @@ -21,7 +23,10 @@ date +%s > $TIMEFILE
[[ $1 =~ ^[0-9]*[mhd]?$ ]] && { echo $1 > $TIMEFILE.maxokdelay; shift; }
trap "flock -u 99" EXIT

output=$(eval $@)
output=$(eval ${@: -1})
exitcode=$?


echo "run_locked run command: ${@: -1}; at $(date); with output: $output; and exit code: $exitcode"

exit $exitcode
16 changes: 8 additions & 8 deletions .contrib/docker/cron/set_crontab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ CLEARSESSIONS_SCHEDULE="${CLEARSESSIONS_SCHEDULE:-@daily}"
# Set the crontab for the application
echo "
# $APP_NAME-send_event_reminders
$EVENT_REMINDERS_SCHEDULE $CRON_DIR/run_locked.sh $APP_NAME-send_event_reminders 25h \
'$PTYHON $APP_ROOT_DIR/manage.py send_event_reminders'
$EVENT_REMINDERS_SCHEDULE cd $APP_ROOT_DIR && $CRON_DIR/run_locked.sh $APP_NAME-send_event_reminders 25h \
\"$PTYHON $APP_ROOT_DIR/manage.py send_event_reminders\" >> /var/log/cron.log 2>&1
# $APP_NAME-send_old_cases_reminder
$OLD_CASES_REMINDER_SCHEDULE $CRON_DIR/run_locked.sh $APP_NAME-send_send_old_cases_reminder 25h \
'$PTYHON $APP_ROOT_DIR/manage.py send_old_cases_reminder'
$OLD_CASES_REMINDER_SCHEDULE cd $APP_ROOT_DIR && $CRON_DIR/run_locked.sh $APP_NAME-send_send_old_cases_reminder 25h \
\"$PTYHON $APP_ROOT_DIR/manage.py send_old_cases_reminder\" >> /var/log/cron.log 2>&1
# $APP_NAME-run_court_session_parser
$COURT_SESSION_PARSER_SCHEDULE $CRON_DIR/run_locked.sh $APP_NAME-run_court_session_parser 34h \
'$PTYHON $APP_ROOT_DIR/manage.py run_court_session_parser'
$COURT_SESSION_PARSER_SCHEDULE cd $APP_ROOT_DIR && $CRON_DIR/run_locked.sh $APP_NAME-run_court_session_parser 34h \
\"$PTYHON $APP_ROOT_DIR/manage.py run_court_session_parser\" >> /var/log/cron.log 2>&1
# $APP_NAME-clearsessions
$CLEARSESSIONS_SCHEDULE $CRON_DIR/run_locked.sh $APP_NAME-clearsessions 34h \
'$PTYHON $APP_ROOT_DIR/manage.py clearsessions'
$CLEARSESSIONS_SCHEDULE cd $APP_ROOT_DIR && $CRON_DIR/run_locked.sh $APP_NAME-clearsessions 34h \
\"$PTYHON $APP_ROOT_DIR/manage.py clearsessions\" >> /var/log/cron.log 2>&1
" | crontab -

# The run_locked.sh script is a simple wrapper around flock that ensures that only one
Expand Down
2 changes: 1 addition & 1 deletion poradnia/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.2.09"
__version__ = "1.2.10"


# Compatibility to eg. django-rest-framework
Expand Down

0 comments on commit a257d55

Please sign in to comment.