-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate supervisord to parallel (#1592)
- Loading branch information
Showing
6 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env sh | ||
|
||
_term() { | ||
echo "Signal caught ... cleaning up" | ||
kill -TERM "$child" 2>/dev/null | ||
} | ||
|
||
trap _term SIGTERM | ||
trap _term SIGINT | ||
|
||
echo "Running in parallel" | ||
|
||
parallel --citation | ||
|
||
# buffer output on line basis | ||
# exit when the first job fails, kill all running jobs. | ||
# upon unexpected termination, signal jobs before killing (signal, timeout) | ||
# execute all *.sh files in parallel | ||
parallel \ | ||
--line-buffer \ | ||
--halt now,fail=1 \ | ||
--termseq INT,200,TERM,100,KILL,25 \ | ||
'{}' ::: /runners/*.sh & | ||
|
||
child=$! | ||
wait "$child" | ||
echo "Exiting" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo "Starting dashboard" | ||
/usr/local/bin/dashboard --docker-key-dir /etc/nuclio/dashboard/registry-credentials --listen-addr :18070 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
|
||
echo "Starting nginx" | ||
/usr/sbin/nginx -g "daemon off;" &> /var/log/nginx/logs.log |
This file was deleted.
Oops, something went wrong.