Last active
September 28, 2017 06:34
-
-
Save hoto17296/c395ec8bdcc764dd1d4c0c74bc2aa57f to your computer and use it in GitHub Desktop.
Digdag サーバに登録されている workflow を実行するシェルスクリプト
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
#!/bin/bash -eu | |
if [ $# -ne 1 ]; then | |
echo -e "Usage:\n run_workflow.sh <workflowId>" 1>&2 | |
exit 1 | |
fi | |
API_BASE='http://127.0.0.1:65432' | |
WORKFLOW_ID=$1 | |
SESSION_TIME=`date -u +"%Y-%m-%dT%H:%M:%SZ"` | |
curl -sS \ | |
-X PUT \ | |
-H "Accept: application/json" \ | |
-H "Content-type: application/json" \ | |
-d "{\"workflowId\":\"${WORKFLOW_ID}\",\"sessionTime\":\"${SESSION_TIME}\",\"params\":{}" \ | |
${API_BASE}/api/attempts/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment