Pdf generation and sending Database notifications takes too much time.
Pdf generation and sending Database notifications takes too much time. like 5 to 6s. I have created a Job too. still its taking same amount of time. Here is my code for Job
And Here is the LetterEdit
8 Replies
Is the job running on the queue? Or are you using the
sync
driver?
And what part is taking much time? If it takes some seconds to complete the job there’s nothing filament can do about itphp artisan queue:work
around 6 to 10 sec. and sometimes exceed error max 30
It seems normal to me ...
if its a job, then i can just press approve and get on with other operations right? Job will update the status and generate the letter and then notification will be send?
And the jobs are shown as run?
If it’s on the queue why do you mind?
hehe. good point 🙂 . however, i cant go back to other letters when its running. thats the issue
php artisan queue:work
INFO Processing jobs from the [default] queue.
this is whats showing
But no jobs? Again: check the queue driver. Is it
sync
yes. it is. changed to database, migrated. now i think its ok
INFO Processing jobs from the [default] queue.
2024-06-26 01:05:15 App\Jobs\ProcessLetterApproval ..................................................................................... RUNNING 2024-06-26 01:05:15 App\Jobs\ProcessLetterApproval ............................................................................... 111.99ms DONE 2024-06-26 01:05:15 App\Jobs\GeneratePdfForLetter ...................................................................................... RUNNING 2024-06-26 01:05:22 App\Jobs\GeneratePdfForLetter ...................................................................................... 6s DONE 2024-06-26 01:05:22 App\Jobs\SendLetterNotification .................................................................................... RUNNING 2024-06-26 01:05:22 App\Jobs\SendLetterNotification .............................................................................. 101.98ms DONE 2024-06-26 01:05:22 Filament\Notifications\DatabaseNotification ........................................................................ RUNNING 2024-06-26 01:05:22 Filament\Notifications\DatabaseNotification ................................................................... 55.69ms DONE Thank You
2024-06-26 01:05:15 App\Jobs\ProcessLetterApproval ..................................................................................... RUNNING 2024-06-26 01:05:15 App\Jobs\ProcessLetterApproval ............................................................................... 111.99ms DONE 2024-06-26 01:05:15 App\Jobs\GeneratePdfForLetter ...................................................................................... RUNNING 2024-06-26 01:05:22 App\Jobs\GeneratePdfForLetter ...................................................................................... 6s DONE 2024-06-26 01:05:22 App\Jobs\SendLetterNotification .................................................................................... RUNNING 2024-06-26 01:05:22 App\Jobs\SendLetterNotification .............................................................................. 101.98ms DONE 2024-06-26 01:05:22 Filament\Notifications\DatabaseNotification ........................................................................ RUNNING 2024-06-26 01:05:22 Filament\Notifications\DatabaseNotification ................................................................... 55.69ms DONE Thank You