Skip to content

Commit ea2fced

Browse files
Use load-config directly
1 parent 8f29290 commit ea2fced

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

cron/clear_cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0 0 * * * bash -c "source /api/tmp/environment; cd /api; rake judge0:clear_cache &> /api/log/clear_cache.log"
1+
0 0 * * * bash -c "source /api/environment && cd /api && rake judge0:clear_cache &> ./log/clear_cache.log"

cron/telemetry

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0 */12 * * * bash -c "source /api/tmp/environment; /api/bin/telemetry &> /api/log/telemetry.log"
1+
0 */12 * * * bash -c "source /api/environment && cd /api && ./bin/telemetry &> ./log/telemetry.log"

scripts/load-config

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,3 @@ export POSTGRES_USER=${POSTGRES_USER:-postgres}
4949
# Other
5050
export RUBYOPT=-W:no-deprecated
5151
export DISABLE_DATABASE_ENVIRONMENT_CHECK=1
52-
53-
54-
export > /api/tmp/environment

scripts/server

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
#
44
# Usage: ./scripts/server
55
#
6-
for i in $(seq 1 $RESTART_MAX_TRIES); do
7-
source ./scripts/load-config
6+
source ./scripts/load-config
7+
export | sudo tee /api/environment
88

9+
for i in $(seq 1 $RESTART_MAX_TRIES); do
910
[[ -f tmp/pids/server.pid ]] && rm -f tmp/pids/server.pid
1011

1112
rails db:create db:migrate db:seed

scripts/workers

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Usage: ./scripts/workers
55
#
66
source ./scripts/load-config
7+
export | sudo tee /api/environment
78

89
run_resque=1
910
resque_pid=0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy