first commit
This commit is contained in:
28
server-ce/cron/deactivate-projects.sh
Executable file
28
server-ce/cron/deactivate-projects.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
echo "-------------------------"
|
||||
echo "Deactivating old projects"
|
||||
echo "-------------------------"
|
||||
date
|
||||
|
||||
ENABLE_CRON_RESOURCE_DELETION=$(cat /etc/container_environment/ENABLE_CRON_RESOURCE_DELETION)
|
||||
|
||||
if [[ "${ENABLE_CRON_RESOURCE_DELETION:-null}" != "true" ]]; then
|
||||
echo "Skipping old project deactivation due to ENABLE_CRON_RESOURCE_DELETION not set to true"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
WEB_URL='http://127.0.0.1:3000'
|
||||
|
||||
USER=$(cat /etc/container_environment/WEB_API_USER)
|
||||
PASS=$(cat /etc/container_environment/WEB_API_PASSWORD)
|
||||
|
||||
curl -v -X POST \
|
||||
-u "${USER}:${PASS}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"numberOfProjectsToArchive":"720","ageOfProjects":"7"}' \
|
||||
"${WEB_URL}/internal/deactivateOldProjects"
|
||||
|
||||
echo "Done."
|
25
server-ce/cron/delete-projects.sh
Executable file
25
server-ce/cron/delete-projects.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
echo "-------------------------"
|
||||
echo "Expiring deleted projects"
|
||||
echo "-------------------------"
|
||||
date
|
||||
|
||||
ENABLE_CRON_RESOURCE_DELETION=$(cat /etc/container_environment/ENABLE_CRON_RESOURCE_DELETION)
|
||||
|
||||
if [[ "${ENABLE_CRON_RESOURCE_DELETION:-null}" != "true" ]]; then
|
||||
echo "Skipping project expiration due to ENABLE_CRON_RESOURCE_DELETION not set to true"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
WEB_URL='http://127.0.0.1:3000'
|
||||
|
||||
USER=$(cat /etc/container_environment/WEB_API_USER)
|
||||
PASS=$(cat /etc/container_environment/WEB_API_PASSWORD)
|
||||
|
||||
curl -X POST -v -u "${USER}:${PASS}" \
|
||||
"${WEB_URL}/internal/expire-deleted-projects-after-duration"
|
||||
|
||||
echo "Done."
|
25
server-ce/cron/delete-users.sh
Executable file
25
server-ce/cron/delete-users.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
echo "----------------------"
|
||||
echo "Expiring deleted users"
|
||||
echo "----------------------"
|
||||
date
|
||||
|
||||
ENABLE_CRON_RESOURCE_DELETION=$(cat /etc/container_environment/ENABLE_CRON_RESOURCE_DELETION)
|
||||
|
||||
if [[ "${ENABLE_CRON_RESOURCE_DELETION:-null}" != "true" ]]; then
|
||||
echo "Skipping user expiration due to ENABLE_CRON_RESOURCE_DELETION not set to true"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
WEB_URL='http://127.0.0.1:3000'
|
||||
|
||||
USER=$(cat /etc/container_environment/WEB_API_USER)
|
||||
PASS=$(cat /etc/container_environment/WEB_API_PASSWORD)
|
||||
|
||||
curl -X POST -v -u "${USER}:${PASS}" \
|
||||
"${WEB_URL}/internal/expire-deleted-users-after-duration"
|
||||
|
||||
echo "Done."
|
12
server-ce/cron/project-history-periodic-flush.sh
Executable file
12
server-ce/cron/project-history-periodic-flush.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
echo "--------------------------"
|
||||
echo "Flush project-history queue"
|
||||
echo "--------------------------"
|
||||
date
|
||||
|
||||
PROJECT_HISTORY_URL='http://127.0.0.1:3054'
|
||||
|
||||
curl -X POST "${PROJECT_HISTORY_URL}/flush/old?timeout=3600000&limit=5000&background=1"
|
12
server-ce/cron/project-history-retry-hard.sh
Executable file
12
server-ce/cron/project-history-retry-hard.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
echo "-----------------------------------"
|
||||
echo "Retry project-history errors (hard)"
|
||||
echo "-----------------------------------"
|
||||
date
|
||||
|
||||
PROJECT_HISTORY_URL='http://127.0.0.1:3054'
|
||||
|
||||
curl -X POST "${PROJECT_HISTORY_URL}/retry/failures?failureType=hard&timeout=3600000&limit=10000"
|
11
server-ce/cron/project-history-retry-soft.sh
Executable file
11
server-ce/cron/project-history-retry-soft.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
echo "-----------------------------------"
|
||||
echo "Retry project-history errors (soft)"
|
||||
echo "-----------------------------------"
|
||||
|
||||
PROJECT_HISTORY_URL='http://127.0.0.1:3054'
|
||||
|
||||
curl -X POST "${PROJECT_HISTORY_URL}/retry/failures?failureType=soft&timeout=3600000&limit=10000"
|
Reference in New Issue
Block a user