diff --git a/.circleci/config.yml b/.circleci/config.yml index 622392cf..d0055f31 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,8 +28,8 @@ jobs: - run: name: Database Setup command: | - bundle exec bin/rails db:create - bundle exec bin/rails db:schema:load + bundle exec rails db:create + bundle exec rails db:schema:load - run: name: Run RSpec tests command: bundle exec rspec diff --git a/app/jobs/cache/cleaning_job.rb b/app/jobs/cache/cleaning_job.rb new file mode 100644 index 00000000..67c4315c --- /dev/null +++ b/app/jobs/cache/cleaning_job.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class Cache::CleaningJob < ApplicationJob + queue_as :default + + def perform + Cache::Clean.call + end +end diff --git a/config/environment.rb b/config/environment.rb index 3c870b83..7e5c58f9 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -7,7 +7,7 @@ require_relative 'application' Rails.application.initialize! # Clear the cache -Cache::Clean.call +Cache::CleaningJob.perform_later # Preheat the cache Cache::PreheatingJob.perform_later