1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #7957 from turbo124/v5-develop

Code cleanup.
This commit is contained in:
David Bomba 2022-11-20 14:39:56 +11:00 committed by GitHub
commit eed6e4432a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 7 deletions

View File

@ -129,11 +129,8 @@ class NinjaMailerJob implements ShouldQueue
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
->send();
// nlog('Using ' . ((int) (memory_get_usage(true) / (1024 * 1024))) . 'MB ');
$this->nmo = null;
$this->company = null;
app('queue.worker')->shouldQuit = 1;
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {

View File

@ -14,11 +14,19 @@ namespace App\Listeners\Invoice;
use App\Libraries\MultiDB;
use App\Models\Activity;
use App\Repositories\ActivityRepository;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use stdClass;
class InvoiceEmailFailedActivity implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $delay = 10;
protected $activity_repo;
/**

View File

@ -18,13 +18,18 @@ use App\Libraries\MultiDB;
use App\Mail\Admin\EntityFailedSendObject;
use App\Notifications\Admin\EntitySentNotification;
use App\Utils\Traits\Notifications\UserNotifies;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class InvoiceFailedEmailNotification
{
use UserNotifies;
public $delay = 5;
use UserNotifies, Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $delay = 10;
public function __construct()
{

View File

@ -451,7 +451,7 @@ class EventServiceProvider extends ServiceProvider
PaymentEmailedActivity::class,
],
PaymentWasEmailedAndFailed::class => [
PaymentEmailFailureActivity::class,
// PaymentEmailFailureActivity::class,
],
PurchaseOrderWasArchived::class => [
PurchaseOrderArchivedActivity::class,

View File

@ -60,7 +60,7 @@ class ActivityRepository extends BaseRepository
$activity->save();
//rate limiter
// $this->createBackup($entity, $activity);
$this->createBackup($entity, $activity);
}
/**