Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Amsterdam 17f3cfb711 internal/poller: fix data race in poller_test
This probably fixes a race condition that we saw in CI (I cannot repro
locally.)

Change-Id: I64ad51d0dac57307aa664a2a5cd435ccf0c74af2
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/297130
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-03-01 14:22:54 +00:00
Jonathan Amsterdam cb9361e611 internal/poller: package for polling and updating a value
Move the logic for updating experiments into a separate package.

A subsequent CL will replace the logic in internal/postgres/excluded.go
with a use of this package.

Motivation: currently, multiple concurrent requests to IsExcluded will
result in multiple DB queries, which is wasteful. It makes more sense
to poll IsExcluded periodically, as we do for experiments.

Change-Id: I33202c1ce1d94a5b1c99fe6a332d89174517fe08
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261818
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2020-10-13 21:30:11 +00:00