mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix(webhook_listeners): Avoid collision between two identical calls at the same second
The job list needs argument to be unique for each registered job, so add a random string on top of time to make sure the same call can be registered several times at the same second. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
7a7f259f3c
commit
6b149be316
1 changed files with 2 additions and 0 deletions
|
|
@ -50,6 +50,8 @@ class WebhooksEventListener implements IEventListener {
|
|||
[
|
||||
$data,
|
||||
$webhookListener->getId(),
|
||||
/* Random string to avoid collision with another job with the same parameters */
|
||||
bin2hex(random_bytes(5)),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue