Skip to content

Queues are not used when DAG is called as sub dag #2047

Description

@privat-eco

Hi everyone ;
The following has been tested against dagu 2.6.1.

I have defined a queue in ~/.config/dagu/config.yaml :

queues:
  enabled: true
  config:
    - name: "my-queue"
      max_concurrency: 1

I have a main DAG which starts sub DAG :

type: graph
steps:
  - id: my_step
    call: my_sub_dag
    parallel:
      items:
        - item1
        - item2
        - item3
        - item4
        - item5
        - item6
        - item7
    params:
       SCOPE: "${ITEM}"
---
name: my_sub_dag
type: graph
queue: my-queue
steps:
  - id: run_this
    command: echo "calling this with scope ${SCOPE}" && /bin/bash -c 'sleep "$((1 + $RANDOM % 10))"'

Expected behavior : my_sub_dag should run one at a time, regarding the max_concurrency specified by the queue definition
Current behavior : my_sub_dag is all run at the same time (7 occurrences in the example above)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions