1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Notifications into the queue

Forces notifications into a dedicated SendNotificationsJob and passed
to the queue.

- One static method re-used in the job ::getAttributes, is that okay or
  use a trait?
- Do we want to use this solution and refactor into a better Hub after
  stable, postpone this implementation or use it in b11?
This commit is contained in:
Daniël Klabbers
2019-11-13 11:58:52 +01:00
committed by Franz Liedke
parent 6b3d634917
commit cd8a8e9dd7
7 changed files with 174 additions and 79 deletions

22
src/Queue/AbstractJob.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Queue;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class AbstractJob implements ShouldQueue
{
use InteractsWithQueue;
use Queueable;
use SerializesModels;
}