Commit graph

13 commits

Author SHA1 Message Date
GitLab Bot
c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot
0c4b9cacd5 Add latest changes from gitlab-org/gitlab@master 2020-05-06 06:09:36 +00:00
GitLab Bot
18a102a5b9 Add latest changes from gitlab-org/gitlab@master 2019-11-08 03:06:48 +00:00
Gabriel Mazetto
9b5e4ecc55 Add rake task to cleanup any existing exclusive lease 2018-03-09 13:32:18 +00:00
Yorick Peterse
7f30bb9c29
Run background migrations with a minimum interval
This adds a minimum interval to BackgroundMigrationWorker, ensuring
background migrations of the same class only run once every 5 minutes.
This prevents a thundering herd problem where scheduled migrations all
run at once due to their delays having been expired (e.g. as the result
of a queue being paused for a long time).

If a job was recently executed it's rescheduled with a delay that equals
the remaining time of the job's lease. This means that if the lease
expires in two minutes we only need to wait two minutes, instead of
five.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/41624
2018-01-05 16:23:25 +01:00
Tiago Botelho
39298575a8 Adds exclusive lease to Git garbage collect worker. 2017-09-07 18:52:04 +01:00
Rémy Coutable
ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Paul Charlton
cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
Gabriel Mazetto
43c3fa4455 Introduce #renew for ExclusiveLease 2017-06-24 03:40:58 +02:00
Jacob Vosmaer
6bcc52a536 Refine Git garbage collection 2016-11-04 14:30:11 +01:00
Yorick Peterse
3b4af59a5f
Don't schedule ProjectCacheWorker unless needed
This changes ProjectCacheWorker.perform_async so it only schedules a job
when no lease for the given project is present. This ensures we don't
end up scheduling hundreds of jobs when they won't be executed anyway.
2016-10-25 16:02:36 +02:00
Jacob Vosmaer
a28c84b4ca Improve test descriptions 2016-03-10 12:55:06 +01:00
Jacob Vosmaer
662c4df748 Add tests for ExclusiveLease 2016-03-10 12:52:19 +01:00