Skip to content

Commit

Permalink
Chore: Remove redis backed reporting (chatwoot#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
subintp authored May 2, 2020
1 parent ddbc612 commit 7e62000
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 322 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ gem 'pundit'
# https://karolgalanciak.com/blog/2019/11/30/from-activerecord-callbacks-to-publish-slash-subscribe-pattern-and-event-driven-design/
gem 'wisper', '2.0.0'

##--- gems for reporting ---##
gem 'nightfury'

##--- gems for billing ---##
gem 'chargebee'

Expand Down
4 changes: 1 addition & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ GEM
multi_xml (0.6.0)
multipart-post (2.1.1)
netrc (0.11.0)
nightfury (1.0.1)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
Expand Down Expand Up @@ -533,8 +532,7 @@ DEPENDENCIES
letter_opener
listen
mini_magick
mock_redis!
nightfury
mock_redis
pg
pry-rails
puma
Expand Down
77 changes: 0 additions & 77 deletions app/builders/report_builder.rb

This file was deleted.

99 changes: 0 additions & 99 deletions app/controllers/api/v1/accounts/reports_controller.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/dispatchers/async_dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def publish_event(event_name, timestamp, data)
end

def listeners
listeners = [EventListener.instance, ReportingListener.instance, WebhookListener.instance]
listeners = [EventListener.instance, WebhookListener.instance]
listeners << SubscriptionListener.instance if ENV['BILLING_ENABLED']
listeners
end
Expand Down
10 changes: 0 additions & 10 deletions app/identities/account_identity.rb

This file was deleted.

8 changes: 0 additions & 8 deletions app/identities/agent_identity.rb

This file was deleted.

1 change: 0 additions & 1 deletion config/initializers/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
password: ENV.fetch('REDIS_PASSWORD', nil).presence
}
redis = Rails.env.test? ? MockRedis.new : Redis.new(app_redis_config)
Nightfury.redis = Redis::Namespace.new('reports', redis: redis)

# Alfred - Used currently for round robin and conversation emails.
# Add here as you use it for more features
Expand Down
19 changes: 0 additions & 19 deletions config/reports_redis.yml

This file was deleted.

11 changes: 0 additions & 11 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,6 @@
resources :notifications, only: [:index, :update]
resource :notification_settings, only: [:show, :update]

resources :reports, only: [] do
collection do
get :account
get :agent
end
member do
get :account_summary
get :agent_summary
end
end

# this block is only required if subscription via chargebee is enabled
resources :subscriptions, only: [:index] do
collection do
Expand Down
18 changes: 0 additions & 18 deletions lib/constants/report.rb

This file was deleted.

33 changes: 0 additions & 33 deletions lib/custom_exceptions/report.rb

This file was deleted.

39 changes: 0 additions & 39 deletions spec/listeners/reporting_listener_spec.rb

This file was deleted.

0 comments on commit 7e62000

Please sign in to comment.