indexed posts enums

This commit is contained in:
Dylan Knutson
2024-12-25 21:46:33 +00:00
parent 355da6932b
commit 2381df7d10
22 changed files with 205 additions and 83 deletions

View File

@@ -5,15 +5,7 @@ require "rake/testtask"
require_relative "config/application"
Rails.application.load_tasks
$LOAD_PATH << Rails.root.join("rake")
Rake.application.rake_require "sst"
Rake.application.rake_require "log_entry"
Rake.application.rake_require "metrics"
Rake.application.rake_require "fa"
Rake.application.rake_require "e621"
Rake.application.rake_require "twitter"
Rake.application.rake_require "ib"
Rake.application.rake_require "blob_file"
Dir.glob(Rails.root.join("rake", "*.rake")).each { |rake_file| load rake_file }
task set_ar_stdout: :environment do
ActiveRecord::Base.logger = Logger.new($stdout)
@@ -88,7 +80,7 @@ task good_job: %i[environment set_ar_stdout set_logger_stdout] do
"GOOD_JOB_MAX_THREADS" => "4",
"GOOD_JOB_QUEUES" =>
ENV["GOOD_JOB_QUEUES"] ||
%w[manual:4 fa_post,e621:2 *:6].reject(&:nil?).join(";")
%w[manual:4 fa_post,e621:2 *:6].reject(&:nil?).join(";"),
}
env_hash.each do |key, value|
@@ -136,7 +128,7 @@ task :reverse_csv do
CSV.new(
File.open("rev_" + file, "w"),
write_headers: true,
headers: in_csv.headers
headers: in_csv.headers,
)
in_csv.reverse_each { |row| out_csv << row.map(&:second) }
out_csv.close