Skip to content

Commit 60ffb04

Browse files
[11.x] Fix withoutOverlapping via PendingEventAttributes proxy (#53553)
* fix * Update PendingEventAttributes.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent e4feb68 commit 60ffb04

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Illuminate/Console/Scheduling/PendingEventAttributes.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,23 @@ public function __construct(
1717
) {
1818
}
1919

20+
/**
21+
* Do not allow the event to overlap each other.
22+
*
23+
* The expiration time of the underlying cache lock may be specified in minutes.
24+
*
25+
* @param int $expiresAt
26+
* @return $this
27+
*/
28+
public function withoutOverlapping($expiresAt = 1440)
29+
{
30+
$this->withoutOverlapping = true;
31+
32+
$this->expiresAt = $expiresAt;
33+
34+
return $this;
35+
}
36+
2037
/**
2138
* Merge the current attributes into the given event.
2239
*/

0 commit comments

Comments
 (0)