Skip to content

Commit

Permalink
after testing remove service
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed Aug 23, 2024
1 parent 53ca983 commit 1184396
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 53 deletions.
8 changes: 1 addition & 7 deletions app/Jobs/FolderAddEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use App\Notifications\EntityUpdated;
use App\Services\FederationService;
use App\Services\NotificationService;
use App\Services\QueueService;
use App\Traits\HandlesJobsFailuresTrait;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
Expand Down Expand Up @@ -78,12 +77,7 @@ public function handle(): void
NotificationService::sendModelNotification($this->entity, new EntityUpdated($this->entity));
}
}

$jobExists = QueueService::jobExists(FolderAddEntity::class, $this->entity->id);

if ($jobExists) {
RunMdaScript::dispatch($federation, $lock->owner());
}
RunMdaScript::dispatch($federation, $lock->owner());

} catch (Exception $e) {
$this->fail($e);
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function boot()
Notification::sendNow($admins, new TooManyRequests(User::find($key)));

return redirect()->back()
->with('status', 'error')
->with('status', __('notifications.too_many_requests_subject_notification'))
->with('color', 'red');
});
});
Expand Down
45 changes: 0 additions & 45 deletions app/Services/QueueService.php

This file was deleted.

1 change: 1 addition & 0 deletions lang/cs/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@
'entity_deleted_from_rs_body' => 'Entita :name již není součástí kategorie entit R&S.',
'too_many_requests_body' => 'Bylo provedeno příliž mnoho pokusů o změnu souboru uživatelem :user',
'too_many_requests_subject' => 'podezřelá aktivita',
'too_many_requests_subject_notification' => 'Bylo provedeno příliž mnoho pokusů o změnu entity, počkejte minutu zkuste znovu',
];
1 change: 1 addition & 0 deletions lang/en/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@
'entity_deleted_from_rs_body' => ':name is not member of R&S entity category anymore.',
'too_many_requests_body' => 'multiple attempts to modify the file were made by the user :user',
'too_many_requests_subject' => 'suspicious activity',
'too_many_requests_subject_notification' => 'multiple attempts to modify the entity were made, please wait a minute and try again.',
];

0 comments on commit 1184396

Please sign in to comment.