Skip to main content
Version: 3.9.0

[WebSocket] Attach to the working queue

GET 

/work/queue

WebSocket Endpoint​

The client needs to send all the required headers for a ws connection and has to handle the websocket protocol.
Note this can not be tested from within swagger!

This endpoint is used by worker nodes which can perform work. A worker would use this endpoint to establish a websocket connection and register the tasks that can be performed by the worker. One worker can perform one or more tasks over one connection.

In case the connection is lost, all outstanding tasks are rescheduled to other workers. This means the local tasks queue should be wiped in case of connection loss.

Note: the server tries to spread the number of tasks evenly over the number of workers. This number is derived by the number of outstanding messages in the queue irrelevant which tasks are outstanding.

Request​

Query Parameters

    task string[]

    The name of all tasks that this worker is able to perform.

    filter object

    Additional properties to filter tasks of provided task name. The value of the parameter is either a string or a list of strings separated by comma. The available filter criteria are defined by the specific task to execute.

    All specified filter criteria need to match by the task to execute. If a list of values is defined for a filter criteria, at least one needs to match. (e.g. cloud=aws,gcp would match a task for cloud=aws).

    Example: The worker is able to perform tasks of type tag, but only for cloud AWS: cloud=aws

         The worker is able to perform tasks of type tag, for AWS and GCP:
    cloud=aws,gcp

    Maybe the worker is only capable to perform the work in a specific account.
    cloud=aws&account=123 could be specified to only filter for tasks in this cloud in this
    account.

    In case there are multiple workers that match the task criteria, the most specific worker is taken.

    Example: worker1: cloud=aws,gcp worker2: cloud=aws account=123

    If the task is for cloud=aws and account=123, then only worker2 would get the task to execute not worker1.

Responses​

When the connection is established.

Schema

  • Array [

  • property name* any
  • ]

Loading...

Contact Us

Have feedback or need help? Don’t be shy—we’d love to hear from you!

 

 

 

Some Engineering Inc.