MyGit

6.6.0

dereuromark/cakephp-queue

版本发布时间: 2023-01-05 01:22:52

dereuromark/cakephp-queue最新发布版本:7.0.0(2023-10-30 18:41:58)

Improvements

Allow configuration of serializing strategy:

'Queue' => [
    ...
    'serializerClass' => \Queue\Utility\JsonSerializer::class,
    'serializerConfig' => [...],
],

Added new MailerTask specifically for sending reusable emails using Mailer objects, but without passing through actual objects. Instead, the class string (FQCN) is passed only together with config. This allows it to work with JSON strategy and even in between updates of the server (as passed objects could fail to be "unserialized").

$data = [
    'class' => TestMailer::class,
    'action' => 'testAction',
    'vars' => [...],
];
$queuedJobsTable->createJob('Queue.Mailer', $data);

Added same JSON safe strategy for EmailTask and deprecated the object ways here only to be used with legacy ObjectSerializer.

$data = [
    'class' => Message::class,
    'settings' => $settings,
];
$queuedJobsTable->createJob('Queue.Email', $data);

The benefit of JSON serializing is:

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-01-05发行的版本