-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3.0.2 updates for Aloe release to jobs service
- Loading branch information
1 parent
20cd107
commit c47fe3c
Showing
10 changed files
with
30 additions
and
891 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 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 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 |
---|---|---|
@@ -1 +1 @@ | ||
3.0.1 | ||
3.0.2 |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
# | ||
# jobs-delete | ||
# jobs-hide | ||
# | ||
# author: [email protected] | ||
# | ||
# This script is part of the Agave API command line interface (CLI). | ||
# It deletes a job. If running the job will be stopped. | ||
# | ||
# It marks a job as invisible to most APIs like job listing or history calls. | ||
# This can only be done for jobs in a terminal state. | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
|
@@ -22,7 +22,8 @@ interactive_opts=(apisecret apikey) | |
usage() { | ||
echo -n "$(basename $0) [OPTION]... [JOB_ID] | ||
Delete an existing job. If running, the job will be killed. | ||
Hide an existing job from most APIs, such as listing and history. If the job is | ||
still running, it cannot be hidden. It must be stopped first. | ||
Options: | ||
-z, --access_token Access token | ||
|
@@ -51,16 +52,16 @@ main() { | |
#set -x | ||
|
||
if [ -z "$args" ]; then | ||
err "Please specify a valid app id to delete" | ||
err "Please specify a valid app id to hide" | ||
else | ||
|
||
cmd="curl -sk -H \"${authheader}\" -X DELETE '$hosturl$args?pretty=true'" | ||
cmd="curl -sk -H \"${authheader}\" -H \"Content-Type: application/json\" -X POST '$hosturl${args}/hide?pretty=true'" | ||
|
||
if ((veryverbose)); then | ||
[ "$piped" -eq 0 ] && log "Calling $cmd" | ||
fi | ||
|
||
response=`curl -sk -H "${authheader}" -X DELETE "$hosturl$args?pretty=true"` | ||
response=`curl -sk -H "${authheader}" -H "Content-Type: application/json" -X POST "$hosturl${args}/hide?pretty=true"` | ||
|
||
if [[ $(jsonquery "$response" "status") = 'success' ]]; then | ||
result=$(format_api_json "$response") | ||
|
@@ -80,7 +81,7 @@ format_api_json() { | |
result=$(jsonquery "$1" "result" 1) | ||
json_prettyify "${result}" | ||
else | ||
echo "Successfully deleted job $args" | ||
echo "Successfully hid job $args" | ||
fi | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.