- Removed the active_admin.js file from the project as it is no longer needed.
- Added the Busuanzi site statistics script to the application layout for
tracking page views and visitors.
- Updated the footer layout to include site statistics, providing users
with real-time view and visitor counts.
These changes streamline the asset management by removing unused files and
integrate site analytics directly into the footer for better visibility.
- Update layout with improved styles and spacing
- Modify sections for better visual hierarchy
- Add gradient effects and responsive design adjustments
These changes enhance the overall user experience by providing a
more visually appealing and organized layout for the city
weather art view. Adjustments include background effects,
updated navigation, and improved display of weather statistics
and history records.
- Create SitemapsController to serve sitemaps
- Configure AWS S3 storage for sitemaps
- Update routes to include sitemap paths
- Add SitemapsHelper module
- Configure SitemapGenerator with AWS adapter
- Update storage configurations for AWS
This feature adds sitemap functionality to the application, enabling search engines to discover and index its content more efficiently. It includes configuration for AWS S3 storage to host the sitemaps and updates the application's routes to serve them.
- Removed conditional check for production environment in
the initializer to ensure the sitemap refresh worker
always runs at startup.
- Renamed Sidekiq configuration file from sidekiq.yml to
sidekiq_scheduler.yml to better reflect its purpose.
These changes streamline the initialization process
for scheduled tasks and enhance the clarity of the
configuration files used in the project.
- Add error handling when scheduling the RefreshSitemapWorker in
production.
- Log successful scheduling and errors for improved diagnostics.
This change ensures that any issues with scheduling the worker are
logged and can be addressed promptly, enhancing the reliability of
the application in production.
- Update the condition to check for 'RAILS_BUILD' environment variable
- Allow RefreshSitemapWorker to run in development/test environments
This change clarifies the logic for executing the sitemap refresh worker by
inverting the condition to allow it to run when 'RAILS_BUILD' is not set,
ensuring proper functionality during development and testing phases.
- Change the condition to prevent sitemap refresh in production when
`RAILS_BUILD` is set.
- Ensures that the task only runs in development or non-production
environments, avoiding potential conflicts or wasted resources.
This change helps to streamline the initialization process and enhances
performance by not triggering unnecessary background tasks.
- Modified the schedule_tasks.rb initializer to only run RefreshSitemapWorker.perform_async unless RAILS_BUILD environment variable is set
This change optimizes the build process by preventing unnecessary sitemap refreshes during build time, thus improving overall project performance.
- Change stats div to be responsive
- Adjust coordinates display format for better readability
This update enhances the layout of the city show view by making
it more responsive and improving the display of weather and
geographical data. Additionally, the startup task for
refreshing the sitemap is now consistently executed,
removing unnecessary complexity.
- Update schedule tasks to use Sidekiq and Redis
- Improve task scheduling with caching
- Remove unnecessary code and error handling
This change enhances the reliability and performance of the startup task, leveraging the power of Sidekiq and Redis for background job processing and caching. The improvements ensure a smoother and more efficient application startup experience.
This commit adds a newline at the end of the 'schedule_tasks.rb' file to comply with the standard coding practices. Proper file formatting helps in maintaining code consistency across the project.
- Updated schedule_tasks.rb to include RAILS_BUILD check
- Improved application startup behavior in development mode
This change ensures the startup task does not run unnecessarily in development environment, reducing application startup time and resources usage.
- Update `find_resource` method to use `scoped_collection.friendly.find(params[:id])`
This refactoring improves the find_resource method to work with friendly URLs, making it more robust and user-friendly.
- Schedule RefreshSitemapWorker after initialization
- Implement error handling for scheduling task
- Use Rails cache to prevent multiple tasks running simultaneously
This commit introduces a mechanism that schedules the
RefreshSitemapWorker to run once after the application starts
in production. It ensures that the task does not run
multiple times concurrently by using a cache key.
Error handling is included to log any failures
in scheduling the task, improving overall reliability.
- Introduce jQuery and jQuery UI libraries
- Create an add_jquery.js for global availability
- Import active_admin.js to initialize the setup
These changes integrate jQuery and jQuery UI into the project, which
will facilitate more interactive user interface features. The jQuery
object is made globally accessible to use within other scripts.
- Introduce a new filter for selecting cities by country in the
ActiveAdmin interface.
- Update the ransackable attributes to include country_id for
searchable functionality.
This change enhances the Admin UI by allowing easier access to
city data based on country, improving the user experience for
administrators.
- Added country input field to the city form for better user experience.
- Removed unused region and weather-related fields to declutter the form.
This change improves the data captured for cities and enhances the form's usability by focusing on relevant information.
- Change SLEEP_DURATION from 60 seconds to 120 seconds
This change is made to improve resource management
and allow for a more efficient operation of the batch
processing tasks performed by the worker. It helps in
avoiding potential overload on system resources.
- Change generation interval from 6 hours to 24 hours
- Increase sleep duration from 3 seconds to 60 seconds
These adjustments aim to optimize the worker's performance and reduce resource consumption. This change reflects a shift towards longer generation cycles, potentially improving throughput.
- Change the displayed title from 'Today AI Weather Art' to 'Today AI Weather'.
This change refines the branding by removing the word 'Art', making the title more concise and focused. This is a minor modification that does not impact functionality.
- Introduce `weather_description_icon` and `weather_stat_icon`
helper methods for displaying SVG icons based on weather
conditions and statistics.
- Enhance the city show view by using these icons to display
visual weather information such as temperature, wind, humidity,
visibility, pressure, and cloud cover.
- Optimize the visual styling and layout of the weather stats
and cards for better user experience.
- Change title from 'AI Weather Art' to 'Today AI Weather Art'
This change enhances the clarity of the application by specifying that the art relates to today's weather. It does not affect any functionality but improves the user interface.
- Add ads.txt configuration file
- Update public/ads.txt with Google AdMob publisher ID
This feature allows us to set up Google AdMob in our app and earn revenue from ads.
It includes proper configuration of the ads.txt file for future ad networks.
- Clean up the seed file for cities in China
- Ensure all priority values have a consistent formatting style
This change enhances the readability of the data seeding code without altering the underlying logic or functionality of the application.
- Include async script for Google AdSense in the application layout
- Ensure script loads with crossorigin attribute
This change will allow the application to serve ads from Google, potentially generating revenue. The implementation is non-intrusive and maintains existing functionality.
- Added a space in the array passed to `add_index` in the migration
- Removed unused columns `last_weather_fetch` and `last_image_generation` from the `cities` table
- Ensured consistent code style in the `GenerateWeatherArtWorker` and added required newline at the end of files
These changes improve code readability and maintainability while ensuring that
no unnecessary fields exist in the database schema.
- Add logging to track the generation of weather art for each city.
- Refactor image attachment process to streamline the code by removing the
separate method for attaching images.
- Ensure proper handling of the temporary file used for image processing.
These changes improve observability during the weather art generation
process and encapsulate the image attachment logic within the primary
method, reducing the overhead of a method call. The adjustments also
ensure that temporary files are managed correctly to prevent resource
leaks.
- Introduced constants for configuration settings such as generation interval, maximum duration, and sleep duration.
- Updated the `perform` method to utilize these constants for better readability and maintainability.
- Refactored the `perform` method in `GenerateWeatherArtWorker` to improve flow and error handling by creating separate methods for fetching weather data, generating prompts, images, and handling database transactions.
- Cleaned up city seeding data by removing unnecessary fields while maintaining required functionality.
These changes improve the overall readability of the code and make it easier to adjust the behavior of the workers in the future without digging through the logic.
- Implement caching methods for last weather fetch and image generation
- Adjust sleep duration in BatchGenerateWeatherArtsWorker from 10 seconds to 3 seconds
- Remove unused fields `last_weather_fetch` and `last_image_generation` from the cities table
- Add index on the weather_arts table for optimized querying
This refactor improves data retrieval performance for weather data
associated with cities. Caching reduces database load while the
worker modification allows for faster iterations in generating
weather arts without significantly impacting performance.
- Added 'public' directory to the chown command to ensure the
proper ownership for runtime files.
- This change enhances the security by ensuring that all
necessary directories are owned by the designated non-root
user.
The previous behavior did not account for the 'public'
directory, which could lead to permission issues at runtime.
- Include gtag.js for Google Analytics
- Setup dataLayer for tracking events
- Configure Google Analytics with unique ID
This commit integrates Google Analytics into the web
application to enable tracking of user interactions and
site usage. It sets up the necessary scripts and initializes
the tracking code with the provided unique ID, improving
analytics capabilities.
- update default host in sitemap generator
- refresh sitemap on worker with new host
These changes allow the sitemap to be correctly generated for different environments and to handle the new host correctly, which was the motivation behind this update. No other side effects are expected.
- Ensure consistent use of double quotes for strings in the
Gemfile and sitemap configuration files.
- Add spaces for better readability in array declarations
within the RefreshSitemapWorker.
These changes improve the readability of the code without
changing any functionality. Adhering to a consistent coding
style helps maintainability and team collaboration.
- Add disallow rules for /admin/ to prevent indexing
- Update sitemap URL to point to the correct domain
These changes improve site indexing by ensuring that sensitive
admin pages are not accessible to search engine crawlers
and updating the sitemap to reflect the accurate URL, helping
discovery and SEO efforts.
- Introduced `SeoConcern` module to handle SEO meta tags
- Integrated `meta-tags` gem for customizable meta tags
- Created `RefreshSitemapWorker` to automate sitemap updates
- Added relevant meta tags in controllers for weather art and cities
- Configured sitemap generation settings
These changes improve the SEO of the application by ensuring that
pages have appropriate meta tags. Additionally, a sitemap is now
generated and refreshed daily, enhancing site visibility to search
engines.
- Add language attribute to HTML tag
- Update meta viewport attribute for accessibility
- Include Plausible JavaScript tracking script for analytics
This change improves application accessibility by setting the language attribute for the HTML tag, and it enhances data collection capabilities by integrating Plausible analytics tracking.
- Update compose.yaml to pull policy: always for production environment
- Added RAILS_ENV environment variable for production
Changes impact the overall system functionality by ensuring containers are always pulled from the latest images, and provide clear environment variables for the production environment.
- Update route for Sidekiq web interface from '/sidekiq'
to '/admin/tasks'
This change improves the coherence of the application's routing
by placing the Sidekiq interface under a more descriptive
namespace. It consolidates admin-related tasks under a common
path, enhancing the organization of the routing structure.
- Adjust spacing around the quotes in the Gemfile
- Standardize spacing in the arts_controller for improved readability
- Modify routes file for consistent array formatting
These changes enhance the consistency of code style across the project without altering any functionality or behavior.
- Implement pagination for the cities index view.
- Add shared pagination partial to reduce code duplication.
- Modify arts index view to utilize the new pagination.
- Update cities controller to include pagination logic.
These updates improve usability by allowing better navigation through larger datasets, ensuring users can easily access and view items across multiple pages.
- Add region selection for filtering weather arts by region
- Implement sorting options for newest and oldest entries
- Update pagination to show links for each page when applicable
- Adjust the number of items displayed per page to 10
This commit enhances the user experience by allowing users to filter
and sort weather arts based on their preferences. It also improves
the pagination logic to provide more manageable navigation through
large datasets, making it easier for users to find the artworks they
are interested in.
- Introduce ArtsController with index action
- Create index view for displaying weather arts
- Implement Kaminari for pagination functionality
- Add necessary routes for accessing arts
- Update Gemfile to include Kaminari gem
- Create views for pagination controls
This implementation enhances the Weather Arts Gallery, allowing users to view and navigate through a collection of AI-generated weather arts easily. Pagination controls have been added to improve usability.
- Change network from 'net1' to 'dokploy-network'
- Make 'dokploy-network' an external network
- Update references in multiple services
This update modifies the docker-compose configuration to
utilize an external network named 'dokploy-network' instead
of the previously defined 'net1'. This change is intended
to improve network management and integration with existing
infrastructure.
- Define a custom network 'net1' for services
- Attach services to 'net1' network
- Ensure connectivity between application components
This commit enhances the Docker Compose setup by introducing a
custom network. This isolation can help manage service
dependencies better and improve communication between services,
establishing clearer boundaries. It simplifies networking
configuration and lays the groundwork for further scaling
if needed.
- Removed the version declaration from the compose.yaml file.
This change simplifies the configuration by removing a version number,
allowing Docker Compose to use the latest compatible version. This
change does not impact the functionality of the services defined in
this file.
- Replace hardcoded DATABASE_URL and RAILS_MASTER_KEY with
environment variables.
- Change POSTGRES_PASSWORD to utilize an environment
variable instead of a hardcoded value.
These changes enhance security by ensuring sensitive
information is not exposed in the configuration files,
allowing for better practices in managing environment
variables.
- Disabled port mapping for the web service in the Docker Compose file
- This may affect how the application is accessed outside of the container
- The decision to comment out the ports could be for environmental reasons or to avoid port conflicts
- Changed Redis data volume path from '../daw_data/redis' to '../taw_data/redis'.
This update reflects a restructuring in the project directory for better
data organization and may require corresponding adjustments in other
configuration files to ensure data consistency.