Skip to content

Commit

Permalink
only delete cron job when redis in use
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantk committed Dec 20, 2021
1 parent 00bd82a commit 3720300
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/jobs/support/synchronize_shared_inbox_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ def perform
end
end
end

2 changes: 1 addition & 1 deletion config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
end

# TODO: remove this when incoming email work is to be merged
if ENV["MS_GRAPH_ENABLED"] != "1"
if ENV["MS_GRAPH_ENABLED"] != "1" && ENV["REDIS_URL"].present?
# Ms graph features not enabled, do not run email tasks
Sidekiq::Cron::Job.destroy "synchronize_shared_inbox"
end

0 comments on commit 3720300

Please sign in to comment.