Enable frozen string literals.
Make all string literals immutable by default.
This commit is contained in:
@@ -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.
|
||||
#
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}.
|
||||
#
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A job that applies a bulk update request after it is approved.
|
||||
#
|
||||
# @see {BulkUpdateRequestProcessor}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A job that runs monthly to demote all inactive approvers. Spawned by
|
||||
# {DanbooruMaintenance}.
|
||||
class PruneApproversJob < ApplicationJob
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A job that runs daily to remove expired bans. Spawned by
|
||||
# {DanbooruMaintenance}.
|
||||
class PruneBansJob < ApplicationJob
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A job that runs daily to remove old post disapprovals. Spawned by
|
||||
# {DanbooruMaintenance}.
|
||||
class PrunePostDisapprovalsJob < ApplicationJob
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user