Skip to content

Instantly share code, notes, and snippets.

@hoto17296
Last active September 28, 2017 06:34
Show Gist options
  • Save hoto17296/c395ec8bdcc764dd1d4c0c74bc2aa57f to your computer and use it in GitHub Desktop.
Save hoto17296/c395ec8bdcc764dd1d4c0c74bc2aa57f to your computer and use it in GitHub Desktop.
Digdag サーバに登録されている workflow を実行するシェルスクリプト
#!/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