Commit graph

24 commits

Author SHA1 Message Date
Lin Jen-Shin
5e12b3d841 Prefer leading dots over trailing dots 2017-01-05 23:49:11 +08:00
Lin Jen-Shin
8384d0d8d5 Introduce Repository#with_tmp_ref which we need
commits from the other repository. We'll cleanup
the tmp ref after we're done with our business.
2016-12-08 17:57:52 +08: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
Sean McGivern
e37c39a21d Fix force-push message in push emails
`after_sha` maps to the source branch, as it's the head of our compare,
so these were just the wrong way around.
2016-08-19 13:07:39 +01:00
Paco Guzman
c86c1905b5 switch from diff_file_collection to diffs
So we have raw_diffs too
2016-08-03 07:00:20 +02:00
Paco Guzman
1d0c7b7492 Introduce Compare model in the codebase.
This object will manage Gitlab::Git::Compare instances
2016-08-03 07:00:20 +02:00
Sean McGivern
331571e067 Fix emails on push for new and deleted branches 2016-07-21 10:53:38 +01:00
Douwe Maan
a9fa45f09e Represent DiffRefs as proper class instead of tuple array 2016-07-06 18:50:58 -04:00
Stan Hu
47b60b6cfe Make EmailsOnPushWorker use Sidekiq mailers queue
EmailsOnPushWorker was using the default queue, which made it impossible
to prioritize MergeWorker and other key workers with a separate Sidekiq
process.
2016-05-31 15:06:08 -07:00
Sean McGivern
a9977f2b7a Syntax-highlight diffs in push emails
Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151
2016-05-17 13:23:17 +01:00
Sean McGivern
5f27e26bb4 Only generate repository push email once
The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)
2016-05-11 09:16:01 +01:00
Valery Sizov
40ff1318d2 Rails update to 4.2.4 2015-11-25 18:18:44 +02:00
Stan Hu
001c8cd0ee Gracefully handle SMTP user input errors (e.g. incorrect email addresses) to prevent Sidekiq retries
Closes https://github.com/gitlabhq/gitlabhq/issues/9560
2015-08-19 23:18:34 -07:00
Douwe Maan
329db2c5de Fix EmailsOnPush. 2015-03-26 07:38:52 +01:00
Douwe Maan
b13bed62ea Clean up code by using keyword arguments. 2015-03-23 15:08:19 +01:00
Douwe Maan
bf235053ad Send EmailsOnPush email when branch or tag is created or deleted. 2015-03-18 14:07:28 +01:00
Douwe Maan
383c56efa1 Use Gitlab::Git helper methods and constants as much as possible. 2015-03-10 13:39:31 +01:00
Douwe Maan
5d86332153 Send EmailsOnPush when deleting commits using force push.
See #1924.
2015-02-25 15:12:19 +01:00
Douwe Maan
85af3e82bf Add option to disable code diffs to EmailOnPush.
See #1950
2015-02-25 14:29:49 +01:00
Douwe Maan
e0c186c357 Add option to send EmailsOnPush from committer email if domain matches.
See #1809.
2015-02-25 14:20:35 +01:00
Jacob Vosmaer
c10f61802b Run 'GC.start' after every EmailsOnPushWorker job 2014-11-14 12:22:22 +01:00
Dmitriy Zaporozhets
2f780af246
Git::Compare does not have limit param any more
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-29 14:29:59 +03:00
Dmitriy Zaporozhets
59769fdb94
Improve compare logic for EmailOnPush service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-12 12:56:13 +02:00
Dmitriy Zaporozhets
6ac73f45f0
Move EmailOnPush logic to async worker
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-18 13:42:12 +02:00