Skip to content

Commit

Permalink
Record the stoppedAt time when marking a workflow as done. (#93)
Browse files Browse the repository at this point in the history
* Update WorkflowSummary model

* make generate

* Record the `stoppedAt` time when marking a workflow as done.

* Just check for describeOutput.StopDate
  • Loading branch information
kofi-clever authored Nov 16, 2017
1 parent d43dadd commit 9cad929
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 234 deletions.
2 changes: 2 additions & 0 deletions docs/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
|**retryFor** <br>*optional*|workflow-id of original workflow in case this is a retry|string|
|**status** <br>*optional*||[WorkflowStatus](#workflowstatus)|
|**statusReason** <br>*optional*||string|
|**stoppedAt** <br>*optional*||string (date-time)|
|**workflowDefinition** <br>*optional*||[WorkflowDefinition](#workflowdefinition)|


Expand Down Expand Up @@ -292,6 +293,7 @@
|**retries** <br>*optional*|workflow-id's of workflows created as retries for this workflow|< string > array|
|**retryFor** <br>*optional*|workflow-id of original workflow in case this is a retry|string|
|**status** <br>*optional*||[WorkflowStatus](#workflowstatus)|
|**stoppedAt** <br>*optional*||string (date-time)|
|**workflowDefinition** <br>*optional*||[WorkflowDefinition](#workflowdefinition)|


Expand Down
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Orchestrator for AWS Step Functions


### Version information
*Version* : 0.6.9
*Version* : 0.6.10


### URI scheme
Expand Down
3 changes: 3 additions & 0 deletions executor/workflow_manager_sfn.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ func (wm *SFNWorkflowManager) UpdateWorkflowSummary(workflow *models.Workflow) e
if *describeOutput.Status == sfn.ExecutionStatusTimedOut {
workflow.StatusReason = resources.StatusReasonWorkflowTimedOut
}
if describeOutput.StopDate != nil {
workflow.StoppedAt = strfmt.DateTime(aws.TimeValue(describeOutput.StopDate))
}
workflow.Output = aws.StringValue(describeOutput.Output) // use for error or success (TODO: actually this is only sent for success)
return wm.store.UpdateWorkflow(*workflow)
}
Expand Down
216 changes: 87 additions & 129 deletions gen-go/client/mock_client.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions gen-go/models/workflow_summary.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

170 changes: 68 additions & 102 deletions gen-go/server/mock_controller.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gen-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "workflow-manager",
"version": "0.6.9",
"version": "0.6.10",
"description": "Orchestrator for AWS Step Functions",
"main": "index.js",
"dependencies": {
Expand Down
5 changes: 4 additions & 1 deletion swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ info:
description: Orchestrator for AWS Step Functions
# when changing the version here, make sure to
# re-run `make generate` to generate clients and server
version: 0.6.9
version: 0.6.10
x-npm-package: workflow-manager
schemes:
- http
Expand Down Expand Up @@ -393,6 +393,9 @@ definitions:
createdAt:
type: string
format: date-time
stoppedAt:
type: string
format: date-time
lastUpdated:
type: string
format: date-time
Expand Down

0 comments on commit 9cad929

Please sign in to comment.