-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from ledgerleapllc/staging
Sync staging to master
- Loading branch information
Showing
148 changed files
with
7,090 additions
and
5,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ packages: | |
- php7.4-curl | ||
- php7.4-xml | ||
- php7.4-gmp | ||
- redis-server | ||
- supervisor | ||
|
||
|
||
php: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
namespace App\Console\Commands; | ||
|
||
use App\Console\Helper; | ||
use App\Models\Ballot; | ||
use App\Jobs\BallotReminder24; | ||
use Carbon\Carbon; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class CheckBallot2 extends Command | ||
{ | ||
protected $signature = 'ballot:check2'; | ||
protected $description = 'Ballot Check 2'; | ||
|
||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
public function handle() { | ||
$ballots = Ballot::with(['vote', 'voteResults']) | ||
->where('status', 'active') | ||
->where('time_end', '<=', Carbon::now('UTC')->addHours(24)) | ||
->where('time_end', '>', Carbon::now('UTC')) | ||
->where('reminder_24_sent', false) | ||
->orderBy('time_end', 'asc') | ||
->get(); | ||
|
||
if ($ballots && count($ballots) > 0) { | ||
foreach ($ballots as $ballot) { | ||
BallotReminder24::dispatch($ballot)->onQueue('default_long'); | ||
} | ||
} | ||
|
||
return 0; | ||
} | ||
} |
Oops, something went wrong.