Skip to content

Entity extend#8

Merged
thorewi merged 3 commits into
mainfrom
entity-extend
May 29, 2024
Merged

Entity extend#8
thorewi merged 3 commits into
mainfrom
entity-extend

Conversation

@masicek

@masicek masicek commented May 24, 2024

Copy link
Copy Markdown
Contributor
  • Podpora dávkového vkládání záznamů do DB
  • Podpora ukládání parametrů pro spuštění jobu ve formátu JSON

@masicek masicek requested a review from thorewi May 24, 2024 15:40
'onError' => Expect::type('callable')->nullable(),
'onAfterProcess' => Expect::type('callable')->nullable(),
'onProcessingGetMetadata' => Expect::type('callable')->nullable(),
'parametersFormat' => Expect::string()->nullable(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nejde tady dát něco jako enum?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bylo by to moc komplikované, pokud chceme v neno konfigu pak použít např.

parametersFormat: @ADT\BackgroundQueue\Entity\BackgroundJob::PARAMETERS_FORMAT_JSON

při definici jako je tato

'parametersFormat' => Expect::anyOf(BackgroundJob::PARAMETERS_FORMAT_SERIALIZE, BackgroundJob::PARAMETERS_FORMAT_JSON)->default(BackgroundJob::PARAMETERS_FORMAT_SERIALIZE),

Pak nám to hlásí chybu.

The item 'backgroundQueue › parametersFormat' expects to be 'serialize'|'json', '@ADT...' given.

Nechal bych volitelně string a kontrola je pak v hlavní knihovně BacgroundQueue.

@thorewi thorewi merged commit cec83f5 into main May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants