Enhance Inkbunny job processing and update post handling

- Updated Rakefile to enqueue periodic jobs for Inkbunny latest posts, improving background processing.
- Added a check in UpdatePostsJob to handle cases with empty post IDs, preventing unnecessary processing.
- Enhanced IndexedPost model to support posting dates for Inkbunny posts.
- Refined view for displaying indexed posts, improving the presentation of posting dates and user experience.
This commit is contained in:
Dylan Knutson
2024-12-30 21:57:32 +00:00
parent c7e7bceb74
commit e781ed8f43
4 changed files with 23 additions and 11 deletions

View File

@@ -42,12 +42,19 @@ task periodic_tasks: %i[environment set_logger_stdout] do
Rake::Task["fa:browse_page_job"].execute
Rake::Task["fa:home_page_job"].execute
Rake::Task["e621:posts_index_job"].execute
Domain::Inkbunny::Job::UpdatePostsJob.set(
puts "enqueue periodic jobs"
sleep 1.minute
end
end
Thread.new do
loop do
puts "enqueue inkbunny latest posts"
Domain::Inkbunny::Job::LatestPostsJob.set(
queue: "inkbunny",
priority: -20,
).perform_later({})
puts "enqueue periodic jobs"
sleep 1.minute
sleep 2.minutes
end
end