Commit Graph

6 Commits

Author SHA1 Message Date
2e438166ee feat: implement sidekiq task management
- Add manual task execution buttons for BatchGenerateWeatherArtsWorker, RefreshSitemapWorker, and CleanAhoyDataWorker
- Improve browser blocking functionality in ApplicationController
- Refactor Sidekiq jobs management to include statistics and task execution
- Update various jobs to conform to new standards

This feature allows for more fine-grained control over Sidekiq tasks and improves the overall user experience.
2025-01-28 01:24:49 +08:00
bf2ff282bb refactor: rename workers to jobs
- Change class names from Worker to Job for better alignment
  with Rails convention.
- Includes changes in BatchGenerateWeatherArtsJob,
  CleanAhoyDataJob, GenerateWeatherArtJob, and
  RefreshSitemapJob classes.

This refactoring improves the clarity and consistency of the
codebase by adhering to established naming conventions,
making it easier for new developers to understand the
role of these classes within the application.
2025-01-28 01:16:17 +08:00
ce5d09b621 feat: add admin management for various entities
- Add menu labels and parents for AdminUser, City, Country, Region, WeatherArt, Ahoy::Event, and Ahoy::Visit.
- Introduce a new page for managing Sidekiq jobs, providing functionality to execute or delete scheduled jobs.
- Adjust batch job for generating weather art by using Sidekiq for improved performance.
- Implement clean-up worker for old Ahoy data and functionalities for refreshing the sitemap.

These changes enhance the administration interface by providing better organization and management tools for backend entities. The addition of Sidekiq jobs management further improves system maintenance capabilities.
2025-01-28 01:15:29 +08:00
853a1d03ce refactor: clean up ai_service code formatting
- Adjust formatting for message parameters in the chat call
- Eliminate unnecessary blank lines in generate_prompt_request method
- Ensure consistent styles for arrays and block indentation

These changes improve code readability and maintain consistency in
formatting for better maintainability without altering functionality.
2025-01-22 16:50:21 +08:00
d728d7f50e feat: add batch weather art generation jobs
- Created BatchGenerateWeatherArtsJob to process eligible
  cities and generate weather art.
- Introduced GenerateWeatherArtJob for generating weather
  art and image attachment.
- Added AiService for obtaining prompts and generating
  images with OpenAI API.
- Implemented WeatherService to fetch current weather
  data from the QWeather API.
- Updated Gemfile with necessary gems (whenever,
  ruby-openai, httparty, down, aws-sdk-s3).

This commit introduces a system to create and store
weather art images for various cities based on current
weather conditions, leveraging external APIs for data
and image generation.
2025-01-22 16:50:00 +08:00
8517905b68 init with rails8 + active-admin 2025-01-19 01:13:59 +08:00