Skip to content

Commit

Permalink
Merge pull request #100 from Clever/fix-default-queue
Browse files Browse the repository at this point in the history
Fix default queue
  • Loading branch information
samfishman authored Nov 30, 2017
2 parents 88dc637 + 9ac93f5 commit 0f78714
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
12 changes: 6 additions & 6 deletions docs/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@
<a name="startworkflowrequest"></a>
### StartWorkflowRequest

|Name|Description|Schema|
|---|---|---|
|**input** <br>*optional*||string|
|**namespace** <br>*optional*||string|
|**queue** <br>*optional*|**Default** : `"default"`|string|
|**workflowDefinition** <br>*optional*||[WorkflowDefinitionRef](#workflowdefinitionref)|
|Name|Schema|
|---|---|
|**input** <br>*optional*|string|
|**namespace** <br>*optional*|string|
|**queue** <br>*optional*|string|
|**workflowDefinition** <br>*optional*|[WorkflowDefinitionRef](#workflowdefinitionref)|


<a name="stateresource"></a>
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.12
*Version* : 0.7.0


### URI scheme
Expand Down
2 changes: 1 addition & 1 deletion gen-go/models/start_workflow_request.go

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

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.12",
"version": "0.7.0",
"description": "Orchestrator for AWS Step Functions",
"main": "index.js",
"dependencies": {
Expand Down
7 changes: 4 additions & 3 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,16 @@ func (h Handler) StartWorkflow(ctx context.Context, req *models.StartWorkflowReq
return &models.Workflow{}, err
}

if req.Queue == nil {
return &models.Workflow{}, fmt.Errorf("workflow queue cannot be nil")
if req.Queue == "" {
req.Queue = "default"
}

// verify request's tags (map[string]interface{}) are actually map[string]string
if err := validateTagsMap(req.Tags); err != nil {
return &models.Workflow{}, err
}

return h.manager.CreateWorkflow(workflowDefinition, req.Input, req.Namespace, *req.Queue, req.Tags)
return h.manager.CreateWorkflow(workflowDefinition, req.Input, req.Namespace, req.Queue, req.Tags)
}

// GetWorkflows returns a summary of all workflows matching the given query.
Expand Down
7 changes: 5 additions & 2 deletions 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.12
version: 0.7.0
x-npm-package: workflow-manager
schemes:
- http
Expand Down Expand Up @@ -508,15 +508,18 @@ definitions:
type: object
properties:
workflowDefinition:
# required
$ref: '#/definitions/WorkflowDefinitionRef'
input:
# required
# format: json
type: string
namespace:
# required
type: string
queue:
# not required (defaults to "default")
type: string
default: "default"
tags:
description: "tags: object with key-value pairs; keys and values should be strings"
additionalProperties:
Expand Down

0 comments on commit 0f78714

Please sign in to comment.