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
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class ArchiveTraceWorker
include ApplicationWorker
include PipelineBackgroundQueue
......
# frozen_string_literal: true
class AuthorizedProjectsWorker
include ApplicationWorker
prepend WaitableWorker
......
# frozen_string_literal: true
class BackgroundMigrationWorker
include ApplicationWorker
......
# frozen_string_literal: true
class BuildCoverageWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildFinishedWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildHooksWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildQueueWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildSuccessWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class BuildTraceSectionsWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class ClusterInstallAppWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class ClusterProvisionWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class ClusterWaitForAppInstallationWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class ClusterWaitForIngressIpAddressWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class CreateGpgSignatureWorker
include ApplicationWorker
......
# frozen_string_literal: true
class CreateNoteDiffFileWorker
include ApplicationWorker
......
# frozen_string_literal: true
class CreatePipelineWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class DeleteMergedBranchesWorker
include ApplicationWorker
......
# frozen_string_literal: true
class DeleteUserWorker
include ApplicationWorker
......
# frozen_string_literal: true
class EmailReceiverWorker
include ApplicationWorker
......
# frozen_string_literal: true
class EmailsOnPushWorker
include ApplicationWorker
......
# frozen_string_literal: true
class ExpireBuildArtifactsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class ExpireBuildInstanceArtifactsWorker
include ApplicationWorker
......
# frozen_string_literal: true
class ExpireJobCacheWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class ExpirePipelineCacheWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class GitGarbageCollectWorker
include ApplicationWorker
......
# frozen_string_literal: true
class GitlabShellWorker
include ApplicationWorker
include Gitlab::ShellAdapter
......
# frozen_string_literal: true
class GitlabUsagePingWorker
LEASE_TIMEOUT = 86400
......
# frozen_string_literal: true
class GroupDestroyWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class ImportExportProjectCleanupWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class InvalidGpgSignatureUpdateWorker
include ApplicationWorker
......
# frozen_string_literal: true
require 'json'
require 'socket'
......@@ -69,8 +71,8 @@ class IrkerWorker
newbranch = "#{Gitlab.config.gitlab.url}/#{repo_path}/branches"
newbranch = "\x0302\x1f#{newbranch}\x0f" if @colors
privmsg = "[#{repo_name}] #{committer} has created a new branch "
privmsg += "#{branch}: #{newbranch}"
privmsg = "[#{repo_name}] #{committer} has created a new branch " \
"#{branch}: #{newbranch}"
sendtoirker privmsg
end
......@@ -112,9 +114,7 @@ class IrkerWorker
url = compare_url data, project.full_path
commits = colorize_commits data['total_commits_count']
new_commits = 'new commit'
new_commits += 's' if data['total_commits_count'] > 1
new_commits = 'new commit'.pluralize(data['total_commits_count'])
sendtoirker "[#{repo}] #{committer} pushed #{commits} #{new_commits} " \
"to #{branch}: #{url}"
end
......@@ -122,8 +122,8 @@ class IrkerWorker
def compare_url(data, repo_path)
sha1 = Commit.truncate_sha(data['before'])
sha2 = Commit.truncate_sha(data['after'])
compare_url = "#{Gitlab.config.gitlab.url}/#{repo_path}/compare"
compare_url += "/#{sha1}...#{sha2}"
compare_url = "#{Gitlab.config.gitlab.url}/#{repo_path}/compare" \
"/#{sha1}...#{sha2}"
colorize_url compare_url
end
......@@ -144,8 +144,7 @@ class IrkerWorker
def files_count(commit)
diff_size = commit.raw_deltas.size
files = "#{diff_size} file"
files += 's' if diff_size > 1
files = "#{diff_size} file".pluralize(diff_size)
files
end
......
# frozen_string_literal: true
class IssueDueSchedulerWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class MergeWorker
include ApplicationWorker
......
# frozen_string_literal: true
# Worker to destroy projects that do not have a namespace
#
# It destroys everything it can without having the info about the namespace it
......
# frozen_string_literal: true
class NewIssueWorker
include ApplicationWorker
include NewIssuable
......
# frozen_string_literal: true
class NewMergeRequestWorker
include ApplicationWorker
include NewIssuable
......
# frozen_string_literal: true
class NewNoteWorker
include ApplicationWorker
......
# frozen_string_literal: true
# @Deprecated - remove once the `object_storage_upload` queue is empty
# The queue has been renamed `object_storage:object_storage_background_upload`
#
......
# frozen_string_literal: true
class PagesDomainVerificationCronWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class PagesDomainVerificationWorker
include ApplicationWorker
......
# frozen_string_literal: true
class PagesWorker
include ApplicationWorker
......
# frozen_string_literal: true
class PipelineHooksWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineMetricsWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineNotificationWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineProcessWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineScheduleWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class PipelineSuccessWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PipelineUpdateWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class PluginWorker
include ApplicationWorker
......
# frozen_string_literal: true
class PostReceive
include ApplicationWorker
......
# frozen_string_literal: true
# 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
......
# frozen_string_literal: true
# Worker for updating any project specific caches.
class ProjectCacheWorker
include ApplicationWorker
......
# frozen_string_literal: true
class ProjectDestroyWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class ProjectExportWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class ProjectMigrateHashedStorageWorker
include ApplicationWorker
......
# frozen_string_literal: true
class ProjectServiceWorker
include ApplicationWorker
......
# frozen_string_literal: true
# Worker for updating any project specific caches.
class PropagateServiceTemplateWorker
include ApplicationWorker
......
# frozen_string_literal: true
class PruneOldEventsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class ReactiveCachingWorker
include ApplicationWorker
......
# frozen_string_literal: true
class RebaseWorker
include ApplicationWorker
......
# frozen_string_literal: true
class RemoveExpiredGroupLinksWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class RemoveExpiredMembersWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class RemoveOldWebHookLogsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class RemoveUnreferencedLfsObjectsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class RepositoryArchiveCacheWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class RepositoryForkWorker
include ApplicationWorker
include Gitlab::ShellAdapter
......
# frozen_string_literal: true
class RepositoryImportWorker
include ApplicationWorker
include ExceptionBacktrace
......
# frozen_string_literal: true
class RepositoryRemoveRemoteWorker
include ApplicationWorker
include ExclusiveLeaseGuard
......
# frozen_string_literal: true
class RepositoryUpdateRemoteMirrorWorker
UpdateAlreadyInProgressError = Class.new(StandardError)
UpdateError = Class.new(StandardError)
......
# frozen_string_literal: true
class RequestsProfilesWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class RunPipelineScheduleWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class ScheduleUpdateUserActivityWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class StageUpdateWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class StorageMigratorWorker
include ApplicationWorker
......
# frozen_string_literal: true
class StuckCiJobsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class StuckImportJobsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class StuckMergeJobsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class SystemHookPushWorker
include ApplicationWorker
......
# frozen_string_literal: true
class TrendingProjectsWorker
include ApplicationWorker
include CronjobQueue
......
# frozen_string_literal: true
class UpdateHeadPipelineForMergeRequestWorker
include ApplicationWorker
include PipelineQueue
......
# frozen_string_literal: true
class UpdateMergeRequestsWorker
include ApplicationWorker
......
# frozen_string_literal: true
class UpdateUserActivityWorker
include ApplicationWorker
......
# frozen_string_literal: true
class UploadChecksumWorker
include ApplicationWorker
......
# frozen_string_literal: true
class WaitForClusterCreationWorker
include ApplicationWorker
include ClusterQueue
......
# frozen_string_literal: true
class WebHookWorker
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