Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mering prod changes - crontabs; API call test #87

Merged
merged 1 commit into from
Sep 13, 2024
Merged
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
14 changes: 6 additions & 8 deletions acl/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@
# calls to give an ok/nok for a machine or node given a tag. Requires
# a bearer token or superuser credentials along with a valid tag.
#
# Disabled for now.
#
# path("acl/api/v1/getok/<str:machine>", views.api_getok, name="acl-v1-getok"),
# path(
# "acl/api/v1/getok4node/<str:node>",
# views.api_getok_by_node,
# name="acl-v1-getok4-node",
# ),
path("acl/api/v1/getok/<str:machine>", views.api_getok, name="acl-v1-getok"),
path(
"acl/api/v1/getok4node/<str:node>",
views.api_getok_by_node,
name="acl-v1-getok4-node",
),
# Provide metadata on a tag, requires a valid tag and a bearer token.
#
# path("acl/api/v1/gettaginfo", views.api_gettaginfo, name="acl-v1-gettaginfo"),
Expand Down
1 change: 0 additions & 1 deletion cron-midnight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ fi
${POETRY_RUN}python manage.py pettycash-recache
${POETRY_RUN}python manage.py clean_duplicate_history --auto > /dev/null
${POETRY_RUN}python manage.py clean_old_history --days 1000 --auto > /dev/null
${POETRY_RUN}python manage.py sent-ufo-reminders
20 changes: 20 additions & 0 deletions cron-weekly.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

test -f .env && source .env

DIR=${DIR:-/usr/local/makerspaceleiden-crm}
cd $DIR || exit 1

POETRY=${POETRY:=false}

unset POETRY_RUN

if $POETRY ; then
export POETRY_RUN="poetry run "
else
. ./venv/bin/activate
fi

${POETRY_RUN}python manage.py sent-ufo-reminders
Loading