Compare commits
No commits in common. "8a89af7512f2e5a8821c8258d1ded5edaaa8d0a4" and "e97b6d426d9268b1f128a6e3a51aada31e0242f2" have entirely different histories.
8a89af7512
...
e97b6d426d
|
@ -146,15 +146,12 @@ class Job {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const kill_timeout =
|
const kill_timeout = set_timeout(async _ => {
|
||||||
(timeout >= 0 &&
|
|
||||||
set_timeout(async _ => {
|
|
||||||
logger.info(
|
logger.info(
|
||||||
`Timeout exceeded timeout=${timeout} uuid=${this.uuid}`
|
`Timeout exceeded timeout=${timeout} uuid=${this.uuid}`
|
||||||
);
|
);
|
||||||
process.kill(proc.pid, 'SIGKILL');
|
process.kill(proc.pid, 'SIGKILL');
|
||||||
}, timeout)) ||
|
}, timeout);
|
||||||
null;
|
|
||||||
|
|
||||||
proc.stderr.on('data', async data => {
|
proc.stderr.on('data', async data => {
|
||||||
if (eventBus !== null) {
|
if (eventBus !== null) {
|
||||||
|
|
13
piston
13
piston
|
@ -14,13 +14,6 @@ docker_compose(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
init_precommit() {
|
|
||||||
if [ $PISTON_ENV == "dev" ]; then
|
|
||||||
rm -f .git/hooks/pre-commit
|
|
||||||
ln -s $(realpath $(dirname "$0"))/pre-commit .git/hooks/pre-commit
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
help)
|
help)
|
||||||
echo "=== Piston Management ==="
|
echo "=== Piston Management ==="
|
||||||
|
@ -66,7 +59,6 @@ case $1 in
|
||||||
|
|
||||||
restart) docker_compose restart ;;
|
restart) docker_compose restart ;;
|
||||||
start)
|
start)
|
||||||
init_precommit
|
|
||||||
rm -f .git/hooks/pre-commit
|
rm -f .git/hooks/pre-commit
|
||||||
ln -s "$PISTON_PATH/pre-commit" "$PISTON_PATH/.git/hooks/pre-commit"
|
ln -s "$PISTON_PATH/pre-commit" "$PISTON_PATH/.git/hooks/pre-commit"
|
||||||
docker_compose up -d
|
docker_compose up -d
|
||||||
|
@ -74,10 +66,7 @@ case $1 in
|
||||||
stop) docker_compose down ;;
|
stop) docker_compose down ;;
|
||||||
bash) docker_compose exec api /bin/bash ;;
|
bash) docker_compose exec api /bin/bash ;;
|
||||||
|
|
||||||
rebuild)
|
rebuild) docker_compose build && docker_compose up -d ;;
|
||||||
init_precommit
|
|
||||||
docker_compose build && docker_compose up -d
|
|
||||||
;;
|
|
||||||
|
|
||||||
update)
|
update)
|
||||||
git pull
|
git pull
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "Linting staged files..."
|
echo "Linting staged files..."
|
||||||
npm install > /dev/null || exit 1
|
npm install
|
||||||
|
|
||||||
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
||||||
[ -z "$FILES" ] && exit 0
|
[ -z "$FILES" ] && exit 0
|
||||||
|
|
Loading…
Reference in New Issue