SchedulerBundle: bug(task): ChainedTask no longer works

the execution of the subtasks no longer works.

with the following configuration, only the bar task seems to run.

scheduler_bundle:
  transport:
    dsn: 'doctrine://default?execution_mode=first_in_first_out'
  tasks:
    chained:
      type: 'chained'
      output: true
      description: 'chained with 2 tasks'
      tasks:
        foo:
          type: 'command'
          command: 'app:foo'
          description: 'command foo chained'
          output: true
        bar:
          type: 'command'
          command: 'app:bar'
          description: 'command bar in chained'
          output: true
    task5:
      type: 'command'
      command: 'app:foo'
      description: 'command task 5'
      output: false
    task6:
      type: 'command'
      command: 'app:bar'
      description: 'command task 6'
      output: false
Capture d’écran 2021-05-22 à 18 20 59

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

Hi @jvancoillie 👋🏻

Small update on this issue, the fix is ready on the linked PR, as I’m always searching for performances and features, I’ve started to implement a lazy-loaded task list via the same PR, it must be ready to merge pretty soon, sorry for the delay 🙂

Hi @jvancoillie 👋🏻

The PR has been merged, the fix will be released via 0.5.0

Nice it works ! great job.

Hello @Guikingone,

I just tried with the same configuration the ChainedType task plays both subtasks well but now it is the last task Task 6 that is no longer executed.

bash-5.1# bin/console scheduler:consume

 // Quit the worker with CONTROL-C.

 ! [NOTE] The tasks output can be displayed if the -vv option is used

 [OK] Task "foo" succeed. (Duration: < 1 sec, Memory used: 23.1 MiB)

 [OK] Task "bar" succeed. (Duration: < 1 sec, Memory used: 23.3 MiB)

 [OK] Task "chained" succeed. (Duration: < 1 sec, Memory used: 23.3 MiB)

 [OK] Task "task5" succeed. (Duration: < 1 sec, Memory used: 23.4 MiB)

+---------+----------------------+------------+---------------------------+---------------------------+-------------------------+-----------------------------+---------+------+
| Name    | Description          | Expression | Last execution date       | Next execution date       | Last execution duration | Last execution memory usage | State   | Tags |
+---------+----------------------+------------+---------------------------+---------------------------+-------------------------+-----------------------------+---------+------+
| chained | chained with 2 tasks | * * * * *  | 2021-05-24T12:48:27+00:00 | 2021-05-24T12:53:00+00:00 | < 1 sec                 | 23.3 MiB                    | enabled |      |
| task5   | command task 5       | * * * * *  | 2021-05-24T12:48:27+00:00 | 2021-05-24T12:53:00+00:00 | < 1 sec                 | 23.4 MiB                    | enabled |      |
| task6   | command task 6       | * * * * *  | Not executed              | 2021-05-24T12:53:00+00:00 | Not tracked             | Not tracked                 | enabled |      |
+---------+----------------------+------------+---------------------------+---------------------------+-------------------------+-----------------------------+---------+------+

Hum, ok, got it, this may requires a new configuration to solve this, I haven’t thought about the isRunning attribute.