Commit graph

15 commits

Author SHA1 Message Date
yukihir0
b8bd7ef809 Fix types comment 2018-11-15 19:15:03 +09: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
Sean McGivern
5b0210a0c8 Fix ProcessCommitWorker when upstream project is deleted 2018-07-10 17:11:31 +01:00
gfyoung
dfbe5ce435 Enable frozen string literals for app/workers/*.rb 2018-06-27 07:23:28 +00:00
Sean McGivern
641b058b9e Fix MR merge commit cross-references to the MR itself 2018-03-05 14:15:58 +00:00
Micaël Bergeron
af5cd10e00 applying feedback
#	modified:   lib/gitlab/git/commit.rb
2018-02-16 13:51:19 -05:00
Micaël Bergeron
eef63813ea stop ProcessCommitWorker from processing MR merge commit
When a merge request is merged, it creates a commit with the
description of the MR, which may contain references and issue
closing references. As this will be handled in the PostMergeService
anyways, let's ignore merge commit generated from a MR.
2018-02-16 13:51:19 -05: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
Felipe Artur
0054963544 Remove unecessary commit pattern check 2017-05-25 12:13:32 -03:00
Felipe Artur
e44016b90a Prevent commits from upstream repositories to be re-processed by forks 2017-05-22 17:43:27 -03:00
James Edwards-Jones
020295fffc Use regex to skip unnecessary reference processing in ProcessCommitWorker 2017-05-04 20:03:46 +01:00
mhasbini
e52b1df1d5 Remove useless queries with false conditions (e.g 1=0) 2017-04-04 13:54:58 +03:00
Yorick Peterse
6b4d33566f
Pass commit data to ProcessCommitWorker
By passing commit data to this worker we remove the need for querying
the Git repository for every job. This in turn reduces the time spent
processing each job.

The migration included migrates jobs from the old format to the new
format. For this to work properly it requires downtime as otherwise
workers may start producing errors until they're using a newer version
of the worker code.
2016-12-01 13:36:06 +01:00
Yorick Peterse
509910b89f
Process commits in a separate worker
This moves the code used for processing commits from GitPushService to
its own Sidekiq worker: ProcessCommitWorker.

Using a Sidekiq worker allows us to process multiple commits in
parallel. This in turn will lead to issues being closed faster and cross
references being created faster. Furthermore by isolating this code into
a separate class it's easier to test and maintain the code.

The new worker also ensures it can efficiently check which issues can be
closed, without having to run numerous SQL queries for every issue.
2016-11-07 13:11:44 +01:00