@@ -68,7 +68,7 @@ public function __construct(BlockTimeService $blockTimeService, MetabaseService
68
68
$ this ->blockTimeService = $ blockTimeService ;
69
69
$ this ->metabaseService = $ metabaseService ;
70
70
71
- $ this ->fromDate = now ()->subDays (30 )->timestamp ;
71
+ $ this ->fromDate = now ()->subDays (365 )->timestamp ;
72
72
$ this ->toDate = now ()->addDays (60 )->timestamp ;
73
73
74
74
$ this ->notificationService = $ notificationService ;
@@ -117,9 +117,9 @@ private function shortRunningTasks(DirectoryParser $directoryParser)
117
117
*/
118
118
private function longRunningTasks ()
119
119
{
120
+ // Loop through all the chains and update project owners
120
121
$ this ->processAll (false );
121
122
122
-
123
123
// Loop through all the chains and update project owners
124
124
$ chains = Chain::all ();
125
125
foreach ($ chains as $ chain ) {
@@ -301,8 +301,13 @@ private function updateApplicationFunding(RoundApplication $application)
301
301
302
302
$ donorAmountUSD = $ this ->metabaseService ->getDonorAmountUSD ($ round ->round_addr , $ application ->application_id );
303
303
$ application ->donor_amount_usd = $ donorAmountUSD ;
304
- $ application ->donor_contributions_count = $ metabase ['contributionsCount ' ];
305
- $ application ->match_amount_usd = $ metabase ['matchAmountUSD ' ];
304
+
305
+ if (isset ($ metabase ['matchAmountUSD ' ])) {
306
+ $ application ->match_amount_usd = $ metabase ['matchAmountUSD ' ];
307
+ }
308
+ if (isset ($ metabase ['contributionsCount ' ])) {
309
+ $ application ->donor_contributions_count = $ metabase ['contributionsCount ' ];
310
+ }
306
311
$ application ->save ();
307
312
308
313
$ this ->info ("Successfully updated application id: {$ application ->id }" );
0 commit comments