Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

[Scheduler] Cannot have multiple #[AsPeriodicTask] on the same method with the same frequency #52853

Copy link
Copy link

Description

@alex-dev
Issue body actions

Symfony version(s) affected

6.4

How to reproduce

Wire a class containing the following into a framework app with scheduler.

#[AsPeriodicTask('PT30M', arguments: ['arg_1'])]
#[AsPeriodicTask('PT30M', arguments: ['arg_2']')]
public function method(string $arg): void {}

Description

Fails to instantiate a Schedule with Duplicated schedule message.
Visibly, they are different tasks, but ServiceCallMessage::__toString() does not consider arguments.

Possible Solution

Serialize args, potentially crc32 them too, into ServiceCallMessage::__toString()

Reactions are currently unavailable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.