From 8d4ab8719496484cffc51b182cad31e4068626d1 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 21 Apr 2021 17:56:23 +0200 Subject: [PATCH] Sync license_type in redis with the values coming from Central --- NEWS.md | 1 + app/services/carto/do_licensing_service.rb | 1 + spec/services/carto/do_licensing_service_spec.rb | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index d137ff47c0..740982644d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,6 +14,7 @@ Development - Limit start parameter of Dropbox connector [#16264](https://github.com/CartoDB/cartodb/pull/16264) - Support staging hostname in the catalog [#16258](https://github.com/CartoDB/cartodb/pull/16258) - Allow the usage of WMTS URLs with parameters to create custom basemaps [#16271](https://github.com/CartoDB/cartodb/pull/16271) +- Sync license_type in redis with the values coming from Central [#16270](https://github.com/CartoDB/cartodb/pull/16270) - Fix subscription/sample filter for datasets [#16254](https://github.com/CartoDB/cartodb/pull/16254) - Use fully qualified table name while creating a new map from a shared dataset [#16241](https://github.com/CartoDB/cartodb/pull/16241) diff --git a/app/services/carto/do_licensing_service.rb b/app/services/carto/do_licensing_service.rb index 332bf1f1e1..4ba797ef7b 100644 --- a/app/services/carto/do_licensing_service.rb +++ b/app/services/carto/do_licensing_service.rb @@ -77,6 +77,7 @@ module Carto expires_at: dataset[:expires_at].to_s, status: dataset[:status], available_in: dataset[:available_in], + license_type: dataset[:license_type] || nil, type: dataset[:type], estimated_size: entity_info[:estimated_size].to_i || 0, estimated_row_count: entity_info[:estimated_row_count].to_i || 0, diff --git a/spec/services/carto/do_licensing_service_spec.rb b/spec/services/carto/do_licensing_service_spec.rb index 49101f0984..79d44d7af8 100644 --- a/spec/services/carto/do_licensing_service_spec.rb +++ b/spec/services/carto/do_licensing_service_spec.rb @@ -49,7 +49,7 @@ describe Carto::DoLicensingService do bq_redis = [ { dataset_id: 'carto.abc.dataset1', created_at: '2020-09-27 07:59:00 +0000', expires_at: '2021-09-27 08:00:00 +0000', - status: 'active', available_in: ['bq', 'bigtable'], type: nil, estimated_size: 0, estimated_row_count: 0, + status: 'active', available_in: ['bq', 'bigtable'], license_type: nil, type: nil, estimated_size: 0, estimated_row_count: 0, estimated_columns_count: 0, num_bytes: 0, sync_status: 'unsynced', unsyncable_reason: nil, unsynced_errors: nil, sync_table: nil, sync_table_id: nil, synchronization_id: nil }