Enable frozen string literals.

Make all string literals immutable by default.
This commit is contained in:
evazion
2021-12-14 19:29:23 -06:00
parent 67b96135dd
commit a7dc05ce63
392 changed files with 786 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs hourly to check the database for corruption. Spawned by {DanbooruMaintenance}.
# Requires at least PostgreSQL 14.0 to be installed for pg_amcheck to be available.
#

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# The base class for all background jobs on Danbooru.
#
# @see https://guides.rubyonrails.org/active_job_basics.html

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs daily to export all tables to BigQuery. Spawned by {DanbooruMaintenance}.
class BigqueryExportAllJob < ApplicationJob
def perform

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that exports a database table to Google Cloud Storage and to Google
# BigQuery. Spawned daily by {DanbooruMaintenance}.
#

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that deletes a user's favorites when they delete their account.
class DeleteFavoritesJob < ApplicationJob
queue_as :default

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that sends notifications about new forum posts to Discord. Spawned by
# the {ForumPost} class when a new forum post is created.
class DiscordNotificationJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs weekly to warn inactive approvers before they're demoted.
# Spawned by {DanbooruMaintenance}.
class DmailInactiveApproversJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that adds a post to IQDB when a new post is uploaded, or when a post is
# regenerated. Spawned by the {Post} class.
class IqdbAddPostJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that removes a post from IQDB when it is deleted. Spawned by the {Post}
# class.
class IqdbRemovePostJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that updates a user's saved searches when they do a search for
# `search:all` or `search:<label>`.
class PopulateSavedSearchJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that applies a bulk update request after it is approved.
#
# @see {BulkUpdateRequestProcessor}

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs monthly to demote all inactive approvers. Spawned by
# {DanbooruMaintenance}.
class PruneApproversJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs daily to remove expired bans. Spawned by
# {DanbooruMaintenance}.
class PruneBansJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs daily to reject expired bulk update requests. Spawned by
# {DanbooruMaintenance}.
class PruneBulkUpdateRequestsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs daily to delete all stale delayed jobs. Spawned by
# {DanbooruMaintenance}.
class PruneDelayedJobsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs daily to remove old post disapprovals. Spawned by
# {DanbooruMaintenance}.
class PrunePostDisapprovalsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs hourly to delete all expired pending, flagged, and appealed
# posts. Spawned by {DanbooruMaintenance}.
class PrunePostsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs hourly to delete all state rate limit objects from the
# database. Spawned by {DanbooruMaintenance}.
class PruneRateLimitsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs hourly to delete all completed, stale, or failed uploads.
# Spawned by {DanbooruMaintenance}.
class PruneUploadsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs hourly to fix all incorrect tag counts.
# Spawned by {DanbooruMaintenance}.
class RegeneratePostCountsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that regenerates a post's images and IQDB when a moderator requests it.
class RegeneratePostJob < ApplicationJob
queue_as :default

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs weekly to retire inactive aliases and implications. Spawned
# by {DanbooruMaintenance}.
class RetireTagRelationshipsJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that downloads and generates thumbnails in the background for an image
# uploaded with the upload bookmarklet.
class UploadPreprocessorDelayedStartJob < ApplicationJob

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that tries to resume a preprocessed image upload job.
class UploadServiceDelayedStartJob < ApplicationJob
queue_as :default

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
# A job that runs daily to vacuum the database. Spawned by {DanbooruMaintenance}.
class VacuumDatabaseJob < ApplicationJob
def perform