Commit 87f7597a authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'frozen-string-app-workers' into 'master'

Enable frozen string literals for app/workers/*.rb

See merge request gitlab-org/gitlab-ce!19944
parents c03701b9 dfbe5ce4
# frozen_string_literal: true
class AdminEmailWorker class AdminEmailWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class ArchiveTraceWorker class ArchiveTraceWorker
include ApplicationWorker include ApplicationWorker
include PipelineBackgroundQueue include PipelineBackgroundQueue
......
# frozen_string_literal: true
class AuthorizedProjectsWorker class AuthorizedProjectsWorker
include ApplicationWorker include ApplicationWorker
prepend WaitableWorker prepend WaitableWorker
......
# frozen_string_literal: true
class BackgroundMigrationWorker class BackgroundMigrationWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class BuildCoverageWorker class BuildCoverageWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class BuildFinishedWorker class BuildFinishedWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class BuildHooksWorker class BuildHooksWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class BuildQueueWorker class BuildQueueWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class BuildSuccessWorker class BuildSuccessWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class BuildTraceSectionsWorker class BuildTraceSectionsWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class ClusterInstallAppWorker class ClusterInstallAppWorker
include ApplicationWorker include ApplicationWorker
include ClusterQueue include ClusterQueue
......
# frozen_string_literal: true
class ClusterProvisionWorker class ClusterProvisionWorker
include ApplicationWorker include ApplicationWorker
include ClusterQueue include ClusterQueue
......
# frozen_string_literal: true
class ClusterWaitForAppInstallationWorker class ClusterWaitForAppInstallationWorker
include ApplicationWorker include ApplicationWorker
include ClusterQueue include ClusterQueue
......
# frozen_string_literal: true
class ClusterWaitForIngressIpAddressWorker class ClusterWaitForIngressIpAddressWorker
include ApplicationWorker include ApplicationWorker
include ClusterQueue include ClusterQueue
......
# frozen_string_literal: true
class CreateGpgSignatureWorker class CreateGpgSignatureWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class CreateNoteDiffFileWorker class CreateNoteDiffFileWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class CreatePipelineWorker class CreatePipelineWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class DeleteMergedBranchesWorker class DeleteMergedBranchesWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class DeleteUserWorker class DeleteUserWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class EmailReceiverWorker class EmailReceiverWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class EmailsOnPushWorker class EmailsOnPushWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class ExpireBuildArtifactsWorker class ExpireBuildArtifactsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class ExpireBuildInstanceArtifactsWorker class ExpireBuildInstanceArtifactsWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class ExpireJobCacheWorker class ExpireJobCacheWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class ExpirePipelineCacheWorker class ExpirePipelineCacheWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class GitGarbageCollectWorker class GitGarbageCollectWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class GitlabShellWorker class GitlabShellWorker
include ApplicationWorker include ApplicationWorker
include Gitlab::ShellAdapter include Gitlab::ShellAdapter
......
# frozen_string_literal: true
class GitlabUsagePingWorker class GitlabUsagePingWorker
LEASE_TIMEOUT = 86400 LEASE_TIMEOUT = 86400
......
# frozen_string_literal: true
class GroupDestroyWorker class GroupDestroyWorker
include ApplicationWorker include ApplicationWorker
include ExceptionBacktrace include ExceptionBacktrace
......
# frozen_string_literal: true
class ImportExportProjectCleanupWorker class ImportExportProjectCleanupWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class InvalidGpgSignatureUpdateWorker class InvalidGpgSignatureUpdateWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
require 'json' require 'json'
require 'socket' require 'socket'
...@@ -69,8 +71,8 @@ class IrkerWorker ...@@ -69,8 +71,8 @@ class IrkerWorker
newbranch = "#{Gitlab.config.gitlab.url}/#{repo_path}/branches" newbranch = "#{Gitlab.config.gitlab.url}/#{repo_path}/branches"
newbranch = "\x0302\x1f#{newbranch}\x0f" if @colors newbranch = "\x0302\x1f#{newbranch}\x0f" if @colors
privmsg = "[#{repo_name}] #{committer} has created a new branch " privmsg = "[#{repo_name}] #{committer} has created a new branch " \
privmsg += "#{branch}: #{newbranch}" "#{branch}: #{newbranch}"
sendtoirker privmsg sendtoirker privmsg
end end
...@@ -112,9 +114,7 @@ class IrkerWorker ...@@ -112,9 +114,7 @@ class IrkerWorker
url = compare_url data, project.full_path url = compare_url data, project.full_path
commits = colorize_commits data['total_commits_count'] commits = colorize_commits data['total_commits_count']
new_commits = 'new commit' new_commits = 'new commit'.pluralize(data['total_commits_count'])
new_commits += 's' if data['total_commits_count'] > 1
sendtoirker "[#{repo}] #{committer} pushed #{commits} #{new_commits} " \ sendtoirker "[#{repo}] #{committer} pushed #{commits} #{new_commits} " \
"to #{branch}: #{url}" "to #{branch}: #{url}"
end end
...@@ -122,8 +122,8 @@ class IrkerWorker ...@@ -122,8 +122,8 @@ class IrkerWorker
def compare_url(data, repo_path) def compare_url(data, repo_path)
sha1 = Commit.truncate_sha(data['before']) sha1 = Commit.truncate_sha(data['before'])
sha2 = Commit.truncate_sha(data['after']) sha2 = Commit.truncate_sha(data['after'])
compare_url = "#{Gitlab.config.gitlab.url}/#{repo_path}/compare" compare_url = "#{Gitlab.config.gitlab.url}/#{repo_path}/compare" \
compare_url += "/#{sha1}...#{sha2}" "/#{sha1}...#{sha2}"
colorize_url compare_url colorize_url compare_url
end end
...@@ -144,8 +144,7 @@ class IrkerWorker ...@@ -144,8 +144,7 @@ class IrkerWorker
def files_count(commit) def files_count(commit)
diff_size = commit.raw_deltas.size diff_size = commit.raw_deltas.size
files = "#{diff_size} file" files = "#{diff_size} file".pluralize(diff_size)
files += 's' if diff_size > 1
files files
end end
......
# frozen_string_literal: true
class IssueDueSchedulerWorker class IssueDueSchedulerWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class MergeWorker class MergeWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
# Worker to destroy projects that do not have a namespace # Worker to destroy projects that do not have a namespace
# #
# It destroys everything it can without having the info about the namespace it # It destroys everything it can without having the info about the namespace it
......
# frozen_string_literal: true
class NewIssueWorker class NewIssueWorker
include ApplicationWorker include ApplicationWorker
include NewIssuable include NewIssuable
......
# frozen_string_literal: true
class NewMergeRequestWorker class NewMergeRequestWorker
include ApplicationWorker include ApplicationWorker
include NewIssuable include NewIssuable
......
# frozen_string_literal: true
class NewNoteWorker class NewNoteWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
# @Deprecated - remove once the `object_storage_upload` queue is empty # @Deprecated - remove once the `object_storage_upload` queue is empty
# The queue has been renamed `object_storage:object_storage_background_upload` # The queue has been renamed `object_storage:object_storage_background_upload`
# #
......
# frozen_string_literal: true
class PagesDomainVerificationCronWorker class PagesDomainVerificationCronWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class PagesDomainVerificationWorker class PagesDomainVerificationWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class PagesWorker class PagesWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class PipelineHooksWorker class PipelineHooksWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class PipelineMetricsWorker class PipelineMetricsWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class PipelineNotificationWorker class PipelineNotificationWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class PipelineProcessWorker class PipelineProcessWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class PipelineScheduleWorker class PipelineScheduleWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class PipelineSuccessWorker class PipelineSuccessWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class PipelineUpdateWorker class PipelineUpdateWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class PluginWorker class PluginWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class PostReceive class PostReceive
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
# Worker for processing individiual commit messages pushed to a repository. # Worker for processing individiual commit messages pushed to a repository.
# #
# Jobs for this worker are scheduled for every commit that is being pushed. As a # Jobs for this worker are scheduled for every commit that is being pushed. As a
......
# frozen_string_literal: true
# Worker for updating any project specific caches. # Worker for updating any project specific caches.
class ProjectCacheWorker class ProjectCacheWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class ProjectDestroyWorker class ProjectDestroyWorker
include ApplicationWorker include ApplicationWorker
include ExceptionBacktrace include ExceptionBacktrace
......
# frozen_string_literal: true
class ProjectExportWorker class ProjectExportWorker
include ApplicationWorker include ApplicationWorker
include ExceptionBacktrace include ExceptionBacktrace
......
# frozen_string_literal: true
class ProjectMigrateHashedStorageWorker class ProjectMigrateHashedStorageWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class ProjectServiceWorker class ProjectServiceWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
# Worker for updating any project specific caches. # Worker for updating any project specific caches.
class PropagateServiceTemplateWorker class PropagateServiceTemplateWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class PruneOldEventsWorker class PruneOldEventsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class ReactiveCachingWorker class ReactiveCachingWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class RebaseWorker class RebaseWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class RemoveExpiredGroupLinksWorker class RemoveExpiredGroupLinksWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class RemoveExpiredMembersWorker class RemoveExpiredMembersWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class RemoveOldWebHookLogsWorker class RemoveOldWebHookLogsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class RemoveUnreferencedLfsObjectsWorker class RemoveUnreferencedLfsObjectsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class RepositoryArchiveCacheWorker class RepositoryArchiveCacheWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class RepositoryForkWorker class RepositoryForkWorker
include ApplicationWorker include ApplicationWorker
include Gitlab::ShellAdapter include Gitlab::ShellAdapter
......
# frozen_string_literal: true
class RepositoryImportWorker class RepositoryImportWorker
include ApplicationWorker include ApplicationWorker
include ExceptionBacktrace include ExceptionBacktrace
......
# frozen_string_literal: true
class RepositoryRemoveRemoteWorker class RepositoryRemoveRemoteWorker
include ApplicationWorker include ApplicationWorker
include ExclusiveLeaseGuard include ExclusiveLeaseGuard
......
# frozen_string_literal: true
class RepositoryUpdateRemoteMirrorWorker class RepositoryUpdateRemoteMirrorWorker
UpdateAlreadyInProgressError = Class.new(StandardError) UpdateAlreadyInProgressError = Class.new(StandardError)
UpdateError = Class.new(StandardError) UpdateError = Class.new(StandardError)
......
# frozen_string_literal: true
class RequestsProfilesWorker class RequestsProfilesWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class RunPipelineScheduleWorker class RunPipelineScheduleWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class ScheduleUpdateUserActivityWorker class ScheduleUpdateUserActivityWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class StageUpdateWorker class StageUpdateWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class StorageMigratorWorker class StorageMigratorWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class StuckCiJobsWorker class StuckCiJobsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class StuckImportJobsWorker class StuckImportJobsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class StuckMergeJobsWorker class StuckMergeJobsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class SystemHookPushWorker class SystemHookPushWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class TrendingProjectsWorker class TrendingProjectsWorker
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
......
# frozen_string_literal: true
class UpdateHeadPipelineForMergeRequestWorker class UpdateHeadPipelineForMergeRequestWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
......
# frozen_string_literal: true
class UpdateMergeRequestsWorker class UpdateMergeRequestsWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class UpdateUserActivityWorker class UpdateUserActivityWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class UploadChecksumWorker class UploadChecksumWorker
include ApplicationWorker include ApplicationWorker
......
# frozen_string_literal: true
class WaitForClusterCreationWorker class WaitForClusterCreationWorker
include ApplicationWorker include ApplicationWorker
include ClusterQueue include ClusterQueue
......
# frozen_string_literal: true
class WebHookWorker class WebHookWorker
include ApplicationWorker include ApplicationWorker
......
---
title: Enable frozen string in app/workers/*.rb
merge_request: 19944
author: gfyoung
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment