Commit 95f60309888c2a645896698c6fdc1533f481bfd5
Exists in
master
and in
29 other branches
Merge branch 'stable'
Conflicts: script/production
Showing
1 changed file
with
8 additions
and
10 deletions
Show diff stats
script/production
... | ... | @@ -35,7 +35,7 @@ do_start() { |
35 | 35 | |
36 | 36 | clear_cache |
37 | 37 | ./script/ferret_server -e $RAILS_ENV start |
38 | - environments_loop | |
38 | + environments_loop start | |
39 | 39 | ruby -S thin -C config/thin.yml start |
40 | 40 | } |
41 | 41 | |
... | ... | @@ -49,11 +49,8 @@ do_stop() { |
49 | 49 | ruby -S thin -C config/thin.yml stop || |
50 | 50 | stop_via_pid_file tmp/pids/thin.*.pid |
51 | 51 | |
52 | - ./script/delayed_job stop || | |
53 | - stop_via_pid_file tmp/pids/delayed_job.pid | |
54 | - | |
55 | - ./script/feed-updater stop || | |
56 | - stop_via_pid_file tmp/pids/feed-updater.default.pid | |
52 | + environments_loop stop || | |
53 | + stop_via_pid_file tmp/pids/delayed_job.pid tmp/pids/delayed_job.*.pid tmp/pids/feed-updater.*.pid | |
57 | 54 | |
58 | 55 | ./script/ferret_server -e $RAILS_ENV stop || |
59 | 56 | stop_via_pid_file tmp/pids/ferret.production.pid |
... | ... | @@ -71,16 +68,17 @@ stop_via_pid_file() { |
71 | 68 | } |
72 | 69 | |
73 | 70 | environments_loop() { |
71 | + action="$1" | |
74 | 72 | environments=$(find ./config/environments -name *_$RAILS_ENV.rb) |
75 | 73 | if [ "$environments" ]; then |
76 | 74 | for environment in $environments; do |
77 | 75 | env=$(basename $environment | cut -d. -f1) |
78 | - RAILS_ENV=$env ./script/delayed_job -i $env start | |
79 | - RAILS_ENV=$env ./script/feed-updater start -i $env | |
76 | + RAILS_ENV=$env ./script/delayed_job -i $env "$action" | |
77 | + RAILS_ENV=$env ./script/feed-updater "$action" -i $env | |
80 | 78 | done |
81 | 79 | else |
82 | - ./script/delayed_job start | |
83 | - ./script/feed-updater start | |
80 | + ./script/delayed_job "$action" | |
81 | + ./script/feed-updater "$action" | |
84 | 82 | fi |
85 | 83 | } |
86 | 84 | ... | ... |