Page MenuHomePhorge

D5026.1775265395.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5026.1775265395.diff

diff --git a/src/app/Console/Kernel.php b/src/app/Console/Kernel.php
--- a/src/app/Console/Kernel.php
+++ b/src/app/Console/Kernel.php
@@ -22,8 +22,6 @@
// This applies wallet charges
$schedule->command('wallet:charge')->everyFourHours();
- // Top-up wallets that should have been topped-up but didn't for some reason
- $schedule->command('wallet:charge --topup')->dailyAt('05:30');
// This removes deleted storage files/file chunks from the filesystem
$schedule->command('fs:expunge')->hourly();
diff --git a/src/app/Jobs/WalletCheck.php b/src/app/Jobs/WalletCheck.php
--- a/src/app/Jobs/WalletCheck.php
+++ b/src/app/Jobs/WalletCheck.php
@@ -69,16 +69,12 @@
return null;
}
- if ($this->wallet->chargeEntitlements() > 0) {
- // We make a payment when there's a charge. If for some reason the
- // payment failed we can't just throw here, as another execution of this job
- // will not re-try the payment. So, we attempt a payment in a separate job.
- try {
- $this->topUpWallet();
- } catch (\Exception $e) {
- \Log::error("Failed to top-up wallet {$this->walletId}: " . $e->getMessage());
- WalletCharge::dispatch($this->wallet->id);
- }
+ $this->wallet->chargeEntitlements();
+ try {
+ $this->topUpWallet();
+ } catch (\Exception $e) {
+ \Log::error("Failed to top-up wallet {$this->walletId}: " . $e->getMessage());
+ // Notification emails should be sent even if the top-up fails
}
if ($this->wallet->balance >= 0) {

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 1:16 AM (19 h, 48 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823448
Default Alt Text
D5026.1775265395.diff (1 KB)

Event Timeline