Skip to content

Commit

Permalink
handle conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Feb 26, 2024
2 parents bc1827f + 79fe569 commit b2f261b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Jobs/GenerateTemporaryInvite.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public function handle()
}
$idArr = explode(",", $idStr);
do_log(sprintf("going to handle %d uid...", count($idArr)));
$now = Carbon::now();
$expiredAt = Carbon::now()->addDays($this->days);
foreach ($idArr as $uid) {
try {
$hashArr = $toolRep->generateUniqueInviteHash([], $this->count, $this->count);
Expand All @@ -75,8 +77,8 @@ public function handle()
'invitee' => '',
'hash' => $hash,
'valid' => 0,
'expired_at' => Carbon::now()->addDays($this->days),
'created_at' => Carbon::now(),
'expired_at' => $expiredAt,
'created_at' => $now,
];
}
if (!empty($data)) {
Expand Down

0 comments on commit b2f261b

Please sign in to comment.