mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fixes async payload passing for #68.
This commit is contained in:
128
docs/swagger.yml
128
docs/swagger.yml
@@ -555,58 +555,67 @@ definitions:
|
||||
readOnly: true
|
||||
|
||||
Task:
|
||||
allOf:
|
||||
- $ref: "#/definitions/NewTask"
|
||||
- type: object
|
||||
properties:
|
||||
group_name:
|
||||
type: string
|
||||
description: "Group this task belongs to."
|
||||
readOnly: true
|
||||
error:
|
||||
type: string
|
||||
description: "The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log."
|
||||
reason:
|
||||
type: string
|
||||
description: |
|
||||
Machine usable reason for task being in this state.
|
||||
Valid values for error status are `timeout | killed | bad_exit`.
|
||||
Valid values for cancelled status are `client_request`.
|
||||
For everything else, this is undefined.
|
||||
enum:
|
||||
- timeout
|
||||
- killed
|
||||
- bad_exit
|
||||
- client_request
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Time when task was submitted. Always in UTC.
|
||||
readOnly: true
|
||||
started_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Time when task started execution. Always in UTC.
|
||||
completed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Time when task completed, whether it was successul or failed. Always in UTC.
|
||||
# We maintain a doubly linked list of the retried task to the
|
||||
# original task.
|
||||
retry_of:
|
||||
type: string
|
||||
description: If this field is set, then this task is a retry of the ID in this field.
|
||||
readOnly: true
|
||||
retry_at:
|
||||
type: string
|
||||
description: If this field is set, then this task was retried by the task referenced in this field.
|
||||
readOnly: true
|
||||
env_vars:
|
||||
# this is a map: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#model-with-mapdictionary-properties
|
||||
type: object
|
||||
description: Env vars for the task. Comes from the ones set on the Group.
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
properties:
|
||||
image:
|
||||
type: string
|
||||
description: Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
|
||||
payload:
|
||||
type: string
|
||||
# 256k
|
||||
# maxLength breaks ruby generator too: https://github.com/treeder/worker_ruby/blob/0aa9236ce5060af3f15758937712973f80dd54fe/lib/iron_titan/models/task.rb#L272
|
||||
# maxLength: 268435456
|
||||
description: Payload for the task. This is what you pass into each task to make it do something.
|
||||
group_name:
|
||||
type: string
|
||||
description: "Group this task belongs to."
|
||||
readOnly: true
|
||||
error:
|
||||
type: string
|
||||
description: "The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log."
|
||||
reason:
|
||||
type: string
|
||||
description: |
|
||||
Machine usable reason for task being in this state.
|
||||
Valid values for error status are `timeout | killed | bad_exit`.
|
||||
Valid values for cancelled status are `client_request`.
|
||||
For everything else, this is undefined.
|
||||
enum:
|
||||
- timeout
|
||||
- killed
|
||||
- bad_exit
|
||||
- client_request
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Time when task was submitted. Always in UTC.
|
||||
readOnly: true
|
||||
started_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Time when task started execution. Always in UTC.
|
||||
completed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Time when task completed, whether it was successul or failed. Always in UTC.
|
||||
# We maintain a doubly linked list of the retried task to the
|
||||
# original task.
|
||||
retry_of:
|
||||
type: string
|
||||
description: If this field is set, then this task is a retry of the ID in this field.
|
||||
readOnly: true
|
||||
retry_at:
|
||||
type: string
|
||||
description: If this field is set, then this task was retried by the task referenced in this field.
|
||||
readOnly: true
|
||||
env_vars:
|
||||
# this is a map: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#model-with-mapdictionary-properties
|
||||
type: object
|
||||
description: Env vars for the task. Comes from the ones set on the Group.
|
||||
additionalProperties:
|
||||
type: string
|
||||
|
||||
ErrorBody:
|
||||
type: object
|
||||
@@ -624,21 +633,6 @@ definitions:
|
||||
error:
|
||||
$ref: '#/definitions/ErrorBody'
|
||||
|
||||
NewTask:
|
||||
type: object
|
||||
required:
|
||||
- image
|
||||
properties:
|
||||
image:
|
||||
type: string
|
||||
description: Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
|
||||
payload:
|
||||
type: string
|
||||
# 256k
|
||||
# maxLength breaks ruby generator too: https://github.com/treeder/worker_ruby/blob/0aa9236ce5060af3f15758937712973f80dd54fe/lib/iron_titan/models/task.rb#L272
|
||||
# maxLength: 268435456
|
||||
description: Payload for the task. This is what you pass into each task to make it do something.
|
||||
|
||||
TaskWrapper:
|
||||
type: object
|
||||
required:
|
||||
|
||||
Reference in New Issue
Block a user