From ad4c75eb1a66aa8e7abe3c64a37c49529aa9bb4d Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 27 Jun 2021 18:12:58 -0500 Subject: [PATCH] docs add more docs to app/{jobs,logical}. These were missed in the last commit. --- app/controllers/README.md | 2 +- app/jobs/bigquery_export_job.rb | 4 ++++ app/jobs/discord_notification_job.rb | 2 ++ app/jobs/iqdb_add_post_job.rb | 2 ++ app/jobs/iqdb_remove_post_job.rb | 2 ++ app/jobs/populate_saved_search_job.rb | 2 ++ app/jobs/process_tag_relationship_job.rb | 3 +++ app/jobs/tag_batch_change_job.rb | 2 +- app/jobs/upload_service_delayed_start_job.rb | 2 +- app/logical/concerns/mentionable.rb | 3 +++ app/logical/danbooru/http/redirector.rb | 4 ++-- app/logical/storage_manager/local.rb | 1 + app/logical/storage_manager/null.rb | 2 ++ app/mailers/application_mailer.rb | 3 +++ config/application.rb | 9 +++++---- script/fixes/README.md | 4 ++-- 16 files changed, 36 insertions(+), 11 deletions(-) diff --git a/app/controllers/README.md b/app/controllers/README.md index cdecd2c61..9df0e3380 100644 --- a/app/controllers/README.md +++ b/app/controllers/README.md @@ -73,7 +73,7 @@ Each controller action above corresponds to an URL: | BansController#update | PUT https://danbooru.donmai.us/bans/1234 | PUT /bans/:id | | | | BansController#destroy | DELETE https://danbooru.donmai.us/bans/1234 | DELETE /bans/:id | | | -These routes are defined in [config/routes.rb](../config/routes.rb). +These routes are defined in [config/routes.rb](../../config/routes.rb). # Authorization diff --git a/app/jobs/bigquery_export_job.rb b/app/jobs/bigquery_export_job.rb index 007eea8fd..8e458b49c 100644 --- a/app/jobs/bigquery_export_job.rb +++ b/app/jobs/bigquery_export_job.rb @@ -1,3 +1,7 @@ +# A job that exports a database table to Google Cloud Storage and to Google +# BigQuery. Spawned daily by {DanbooruMaintenance}. +# +# @see BigqueryExportService class BigqueryExportJob < ApplicationJob retry_on Exception, attempts: 0 diff --git a/app/jobs/discord_notification_job.rb b/app/jobs/discord_notification_job.rb index 20251c178..4f17a2191 100644 --- a/app/jobs/discord_notification_job.rb +++ b/app/jobs/discord_notification_job.rb @@ -1,3 +1,5 @@ +# 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 retry_on Exception, attempts: 0 diff --git a/app/jobs/iqdb_add_post_job.rb b/app/jobs/iqdb_add_post_job.rb index a99daa6f0..e94b61cd2 100644 --- a/app/jobs/iqdb_add_post_job.rb +++ b/app/jobs/iqdb_add_post_job.rb @@ -1,3 +1,5 @@ +# 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 def perform(post) IqdbClient.new.add_post(post) diff --git a/app/jobs/iqdb_remove_post_job.rb b/app/jobs/iqdb_remove_post_job.rb index 3d4cda697..40832c79b 100644 --- a/app/jobs/iqdb_remove_post_job.rb +++ b/app/jobs/iqdb_remove_post_job.rb @@ -1,3 +1,5 @@ +# A job that removes a post from IQDB when it is deleted. Spawned by the {Post} +# class. class IqdbRemovePostJob < ApplicationJob def perform(post_id) IqdbClient.new.remove(post_id) diff --git a/app/jobs/populate_saved_search_job.rb b/app/jobs/populate_saved_search_job.rb index 81b34c8d8..a67681d69 100644 --- a/app/jobs/populate_saved_search_job.rb +++ b/app/jobs/populate_saved_search_job.rb @@ -1,3 +1,5 @@ +# A job that updates a user's saved searches when they do a search for +# `search:all` or `search: