Commit graph

3 commits

Author SHA1 Message Date
Nick Thomas
5af8465396 Simplify a test 2017-09-21 13:19:05 +01:00
Yorick Peterse
b3566a0104
Stop using Sidekiq for updating Key#last_used_at
This makes things simpler as no scheduling is involved. Further we
remove the need for running a SELECT + UPDATE just to get the key and
update it, whereas we only need an UPDATE when setting last_used_at
directly in a request.

The added service class takes care of updating Key#last_used_at without
using Sidekiq. Further it makes sure we only try to obtain a Redis lease
if we're confident that we actually need to do so, instead of always
obtaining it. We also make sure to _only_ update last_used_at instead of
also updating updated_at.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
2017-09-20 14:24:14 +02:00
haseeb
cc2daa74d8 created services for keys 2017-09-15 15:35:24 +00:00