Skip to content

Commit 048a4d5

Browse files
authored
enhancement: add clear_license_response_on_deploy configuration option (#3892)
This update introduces a new configuration attribute to control the clearing of the license response after deployment. The default value is set to true
1 parent 6f4a817 commit 048a4d5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/avo/configuration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class Configuration
5858
attr_accessor :associations_lookup_list_limit
5959
attr_accessor :column_names_mapping
6060
attr_accessor :column_types_mapping
61+
attr_accessor :clear_license_response_on_deploy
6162

6263
def initialize
6364
@root_path = "/avo"
@@ -127,6 +128,7 @@ def initialize
127128
@column_names_mapping = {}
128129
@column_types_mapping = {}
129130
@resource_row_controls_config = {}
131+
@clear_license_response_on_deploy = true
130132
end
131133

132134
unless defined?(RESOURCE_ROW_CONTROLS_CONFIG_DEFAULTS)

lib/avo/engine.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Engine < ::Rails::Engine
3232
# After deploy we want to make sure the license response is being cleared.
3333
# We need a fresh license response.
3434
# This is disabled in development because the initialization process might be triggered more than once.
35-
unless Rails.env.development?
35+
if !Rails.env.development? && Avo.configuration.clear_license_response_on_deploy
3636
begin
3737
Licensing::HQ.new.clear_response
3838
rescue => exception

0 commit comments

Comments
 (0)