Last active
April 24, 2025 13:07
-
-
Save Stono/888c39405b00e850b67d48dc49548185 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
echo "Running $1" | |
args=("${@:2}") # Collect all arguments except the first one into an array | |
args_json=$(printf '"%s",' "${args[@]}") # Convert array into JSON format | |
args_json="[${args_json%,}]" # Remove the trailing comma and wrap in brackets | |
curl -v -X POST http://127.0.0.1:4000/exec/runs \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"cmd": "'$1'", | |
"args": '"$args_json"', | |
"env": {}, | |
"cwd": "/", | |
"spawnedProcessTimeoutsMs": 5000, | |
"memoryLimitBytes": 104857600, | |
"markAsUsed": false, | |
"retryLock": "unique-lock-id" | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment