Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117757734
D5026.1775208273.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5026.1775208273.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 9:24 AM (21 h, 58 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823448
Default Alt Text
D5026.1775208273.diff (1 KB)
Attached To
Mode
D5026: Always try to top-up the wallet on charge
Attached
Detach File
Event Timeline