Commit graph

17 commits

Author SHA1 Message Date
GitLab Bot
33795139ea Add latest changes from gitlab-org/gitlab@master 2020-02-19 18:09:10 +00:00
GitLab Bot
6b8d671de7 Add latest changes from gitlab-org/gitlab@master 2020-02-18 18:09:07 +00:00
GitLab Bot
7351a484d7 Add latest changes from gitlab-org/gitlab@master 2020-02-10 12:08:59 +00:00
GitLab Bot
6b833f1e03 Add latest changes from gitlab-org/gitlab@master 2020-02-04 15:08:40 +00:00
GitLab Bot
f14507e586 Add latest changes from gitlab-org/gitlab@master 2020-02-03 09:08:42 +00:00
GitLab Bot
25989ab7ef Add latest changes from gitlab-org/gitlab@master 2019-10-18 11:11:44 +00:00
GitLab Bot
133924c6cc Add latest changes from gitlab-org/gitlab@master 2019-10-11 00:06:24 +00:00
Jeremy Watson
533a6fef31 Updated code comments for clarity based on 2 years 2018-10-06 10:09:49 +00:00
Jeremy Watson
8f6a1f143d prune older than 2 years instead of 12 months 2018-10-05 13:22:58 +00:00
Yorick Peterse
2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
gfyoung
dfbe5ce435 Enable frozen string literals for app/workers/*.rb 2018-06-27 07:23:28 +00:00
Douwe Maan
0b15570e49 Add ApplicationWorker and make every worker include it 2017-12-05 11:59:39 +01:00
Grzegorz Bizon
0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Yorick Peterse
97731760d7
Re-organize queues to use for Sidekiq
Dumping too many jobs in the same queue (e.g. the "default" queue) is a
dangerous setup. Jobs that take a long time to process can effectively
block any other work from being performed given there are enough of
these jobs.

Furthermore it becomes harder to monitor the jobs as a single queue
could contain jobs for different workers. In such a setup the only
reliable way of getting counts per job is to iterate over all jobs in a
queue, which is a rather time consuming process.

By using separate queues for various workers we have better control over
throughput, we can add weight to queues, and we can monitor queues
better. Some workers still use the same queue whenever their work is
related. For example, the various CI pipeline workers use the same
"pipeline" queue.

This commit includes a Rails migration that moves Sidekiq jobs from the
old queues to the new ones. This migration also takes care of doing the
inverse if ever needed. This does require downtime as otherwise new jobs
could be scheduled in the old queues after this migration completes.

This commit also includes an RSpec test that blacklists the use of the
"default" queue and ensures cron workers use the "cronjob" queue.

Fixes gitlab-org/gitlab-ce#23370
2016-10-21 18:17:07 +02:00
Olaf Tomalka
4b98e812b2 Optimized event pruning query to avoid two queries. 2016-09-07 12:55:25 -07:00
Olaf Tomalka
c0a92cb801 Limited amount of pruned Event rows per run
Old deployments of Gitlab might have a big number of old events to be
deleted. Such numbers cause the worker to timeout.
I've limited the amount of rows that should be destroyed at once to
10000, and increased how often pruning shall take place to 4 times a
day.
2016-09-07 19:41:25 +02:00
Olaf Tomalka
e25b48ffcf Added cron to prune events older than 12 months.
Since contribution calendar shows only 12 months of activity,
events older than that time are not visible anywhere and can be
safely pruned saving big amount of database storage.

Fixes #21164
2016-09-07 19:41:25 +02:00