Blueprints

Add a list of strings to Redis

Source

yaml
id: redis-list
namespace: company.team

variables:
  key: favorite_plugins

tasks:
  - id: clear_list
    type: io.kestra.plugin.redis.list.ListPop
    url: redis://host.docker.internal:6379/0
    key: "{{ vars.key }}"
    maxRecords: 1

  - id: publish_list
    type: io.kestra.plugin.redis.list.ListPush
    url: redis://host.docker.internal:6379/0
    key: "{{ vars.key }}"
    from:
      - redis
      - duckdb
      - gcp
      - aws

About this blueprint

Ingest Software Engineering

The ListPush task will append objects to an existing list. If the list already contains elements, using ListPush could result in duplicate entries. To prevent this, the ListPop task is used to empty the list before ListPush adds the new values. To test this flow, you can start Redis in a Docker container: docker run --name myredis -p 6379:6379 -d redis

List Pop

List Push

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra