Close
    logoCloudomation Docs

    TaskREDIS

    class tasks.task_redis.TaskREDIS

    Interact with a REDIS key value store.

    Warning: This task currently only support unencrypted and unauthenticated connections to REDIS. Contact [info@cloudomation.com](mailto:info@cloudomation.com) to request a feature.

    Consult the redis commands documentation at https://redis.io/commands for details on commands, arguments and result schemas.

    Inputs

    NameTypeDefaultDescription
    argslist[]
    commandstr
    hoststr
    portint6379

    Outputs

    NameTypeDefaultDescription
    resultobject
    execution_idintThe ID of the task execution
    messagestrThe ended message for the task. If the task ended with an error, the message will contain information about what went wrong
    statusstrThe ended status for the task. Either "success" or "error".

    Constants

    input_list = ['args', 'command', 'host', 'port']output_list = ['result']version = 1

    Methods

    run ()

    Example

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    redis_server_info = this.task(
    'REDIS',
    host='my-redis-host',
    command='INFO',
    ).get('output_value')['result']
    this.log(redis_server_info=redis_server_info)
    return this.success('all done')
    Previous
    TaskPS
    Next
    TaskREST