forked from gitea/gitea
1
0
Fork 0
gitea/models/webhook
zeripath 787f6c3227
Ensure that Webhook tasks are not double delivered (#21558)
When re-retrieving hook tasks from the DB double check if they have not
been delivered in the meantime. Further ensure that tasks are marked as
delivered when they are being delivered.

In addition:
* Improve the error reporting and make sure that the webhook task
population script runs in a separate goroutine.
* Only get hook task IDs out of the DB instead of the whole task when
repopulating the queue
* When repopulating the queue make the DB request paged

Ref #17940 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-11-23 22:10:04 +08:00
..
hooktask.go Ensure that Webhook tasks are not double delivered (#21558) 2022-11-23 22:10:04 +08:00
main_test.go Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
webhook.go Allow detect whether it's in a database transaction for a context.Context (#21756) 2022-11-12 21:18:50 +01:00
webhook_test.go Decouple HookTask from Repository (#17940) 2022-10-21 18:21:56 +02:00