Compare commits
No commits in common. "0c0be54505f5acd67eb854d82ef314df76488405" and "c355abc4a7face113855e1b0435749b00b29fdd6" have entirely different histories.
0c0be54505
...
c355abc4a7
|
@ -35,7 +35,6 @@ expressWs(app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
fss.chmodSync(path.join(config.data_directory, globals.data_directories.jobs), 0o711)
|
|
||||||
|
|
||||||
logger.info('Loading packages');
|
logger.info('Loading packages');
|
||||||
const pkgdir = path.join(
|
const pkgdir = path.join(
|
||||||
|
|
|
@ -344,9 +344,6 @@ class Job {
|
||||||
|
|
||||||
const proc_id_int = parse_int(proc_id);
|
const proc_id_int = parse_int(proc_id);
|
||||||
|
|
||||||
// Skip over any processes that aren't ours.
|
|
||||||
if(ruid != this.uid && euid != this.uid) return -1;
|
|
||||||
|
|
||||||
if (state == 'Z'){
|
if (state == 'Z'){
|
||||||
// Zombie process, just needs to be waited, regardless of the user id
|
// Zombie process, just needs to be waited, regardless of the user id
|
||||||
if(!to_wait.includes(proc_id_int))
|
if(!to_wait.includes(proc_id_int))
|
||||||
|
@ -356,6 +353,7 @@ class Job {
|
||||||
}
|
}
|
||||||
// We should kill in all other state (Sleep, Stopped & Running)
|
// We should kill in all other state (Sleep, Stopped & Running)
|
||||||
|
|
||||||
|
if (ruid == this.uid || euid == this.uid)
|
||||||
return proc_id_int;
|
return proc_id_int;
|
||||||
} catch {
|
} catch {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -10,11 +10,11 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 2000:2000
|
- 2000:2000
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/piston/packages:/piston/packages
|
- ./data/piston:/piston
|
||||||
environment:
|
environment:
|
||||||
- PISTON_REPO_URL=http://repo:8000/index
|
- PISTON_REPO_URL=http://repo:8000/index
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /piston/jobs:exec,uid=1000,gid=1000,mode=711
|
- /piston/jobs:exec
|
||||||
|
|
||||||
repo: # Local testing of packages
|
repo: # Local testing of packages
|
||||||
build: repo
|
build: repo
|
||||||
|
|
|
@ -8,7 +8,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 2000:2000
|
- 2000:2000
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/piston/packages:/piston/packages
|
- ./data/piston:/piston
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /piston/jobs:exec,uid=1000,gid=1000,mode=711
|
- /piston/jobs:exec,uid=1000,gid=1000,mode=700
|
||||||
- /tmp:exec
|
- /tmp:exec
|
||||||
|
|
|
@ -4,5 +4,5 @@ code_file=`pwd`/"$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
cd $SMALLTALK_PATH
|
cd $SMALLTALK_PATH
|
||||||
$SMALLTALK_PATH/gst "$code_file" -a "$@"
|
$SMALLTALK_PATH/gst "$code_file" "$@"
|
||||||
|
|
||||||
|
|
9
piston
9
piston
|
@ -14,6 +14,13 @@ docker_compose(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init_precommit() {
|
||||||
|
if [ $PISTON_ENV == "dev" ]; then
|
||||||
|
rm -f .git/hooks/pre-commit
|
||||||
|
ln -s "$PISTON_PATH/pre-commit" "$PISTON_PATH/.git/hooks/pre-commit"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
help)
|
help)
|
||||||
echo "=== Piston Management ==="
|
echo "=== Piston Management ==="
|
||||||
|
@ -59,12 +66,14 @@ case $1 in
|
||||||
|
|
||||||
restart) docker_compose restart ;;
|
restart) docker_compose restart ;;
|
||||||
start)
|
start)
|
||||||
|
init_precommit
|
||||||
docker_compose up -d
|
docker_compose up -d
|
||||||
;;
|
;;
|
||||||
stop) docker_compose down ;;
|
stop) docker_compose down ;;
|
||||||
bash) docker_compose exec api /bin/bash ;;
|
bash) docker_compose exec api /bin/bash ;;
|
||||||
|
|
||||||
rebuild)
|
rebuild)
|
||||||
|
init_precommit
|
||||||
docker_compose build && docker_compose up -d
|
docker_compose build && docker_compose up -d
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@ The following are approved and endorsed extensions/utilities to the core Piston
|
||||||
- [Pyston](https://github.com/ffaanngg/pyston), a Python wrapper for accessing the Piston API.
|
- [Pyston](https://github.com/ffaanngg/pyston), a Python wrapper for accessing the Piston API.
|
||||||
- [Go-Piston](https://github.com/milindmadhukar/go-piston), a Golang wrapper for accessing the Piston API.
|
- [Go-Piston](https://github.com/milindmadhukar/go-piston), a Golang wrapper for accessing the Piston API.
|
||||||
- [piston_rs](https://github.com/Jonxslays/piston_rs), a Rust wrapper for accessing the Piston API.
|
- [piston_rs](https://github.com/Jonxslays/piston_rs), a Rust wrapper for accessing the Piston API.
|
||||||
- [piston_rspy](https://github.com/Jonxslays/piston_rspy), Python bindings for accessing the Piston API via `piston_rs`.
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue