mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Ensure queue state is sane
This commit is contained in:
parent
a0b22f5339
commit
dcc724b667
@ -190,9 +190,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
$truth = app()->make(TruthSource::class);
|
$truth = app()->make(TruthSource::class);
|
||||||
|
|
||||||
if ($this->company){
|
if ($this->company){
|
||||||
|
|
||||||
return $this->company;
|
return $this->company;
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif($truth->getCompany()){
|
elseif($truth->getCompany()){
|
||||||
return $truth->getCompany();
|
return $truth->getCompany();
|
||||||
|
@ -19,6 +19,7 @@ use App\Utils\TruthSource;
|
|||||||
use Illuminate\Cache\RateLimiting\Limit;
|
use Illuminate\Cache\RateLimiting\Limit;
|
||||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||||
use Illuminate\Queue\Events\JobProcessing;
|
use Illuminate\Queue\Events\JobProcessing;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
use Illuminate\Support\Facades\Queue;
|
use Illuminate\Support\Facades\Queue;
|
||||||
use Illuminate\Support\Facades\RateLimiter;
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
@ -61,17 +62,10 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Queue::before(function (JobProcessing $event) {
|
/* Ensure we don't have stale state in jobs */
|
||||||
// // \Log::info('Event Job '.$event->connectionName);
|
Queue::before(function (JobProcessing $event) {
|
||||||
// \Log::error('Event Job '.$event->job->getJobId);
|
App::forgetInstance('truthsource');
|
||||||
// // \Log::info('Event Job '.$event->job->payload());
|
});
|
||||||
// });
|
|
||||||
//! Update Posted AT
|
|
||||||
// Queue::after(function (JobProcessed $event) {
|
|
||||||
// // \Log::info('Event Job '.$event->connectionName);
|
|
||||||
// \Log::error('Event Job '.$event->job->getJobId);
|
|
||||||
// // \Log::info('Event Job '.$event->job->payload());
|
|
||||||
// });
|
|
||||||
|
|
||||||
app()->instance(TruthSource::class, new TruthSource());
|
app()->instance(TruthSource::class, new TruthSource());
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@
|
|||||||
{{ $payment->translateDate($payment->date, $payment->client->date_format(), $payment->client->locale()) }}
|
{{ $payment->translateDate($payment->date, $payment->client->date_format(), $payment->client->locale()) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">
|
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">
|
||||||
|
{{ $payment->translatedType() }}
|
||||||
{{ $payment->translatedType(); }}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">
|
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">
|
||||||
{!! \App\Utils\Number::formatMoney($payment->amount, $payment->client) !!}
|
{!! \App\Utils\Number::formatMoney($payment->amount, $payment->client) !!}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user