Skip to content

Commit 9f9b919

Browse files
authored
Merge pull request #53 from bitdegree-foundation/feature/optimise-new-visit-creation
Optimise how we found out if new visit should be created
2 parents 630238c + 652040d commit 9f9b919

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/PendingVisit.php

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public function __destruct()
133133
// @phpstan-ignore-next-line
134134
$visit = $this->model
135135
->visits()
136+
->where('created_at', '>=', $this->interval)
136137
->latest()
137138
->firstOrCreate($this->buildJsonColumns(), [
138139
'data' => $this->attributes,

0 commit comments

Comments
 (0)