zuora_connect 1.7.70 → 1.7.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80e98c3300b664018c9d002002ca4cdaff656fd6
4
- data.tar.gz: aa88143dd87e2a92c9ef94eec9fb9a8324301a11
3
+ metadata.gz: 3cb12b36b11cca5b692114f1757bbcf46ebe513c
4
+ data.tar.gz: 8d2849ed5052a8c4f2356d823e0f91359b738a2e
5
5
  SHA512:
6
- metadata.gz: 9b531bd590a253e0a8dce6d35d5eee2a9a94b666aac3ec481078df258c3781c8cf723401eab6c39aea520c9eb4e3e66c2fd29f5cff8dcc403dc7215f6ba1dec0
7
- data.tar.gz: 36461637ab5b86d8f6b2a0ce8ad15291ab4d5cf4f69b7ffa555666fd1550d9c333a720f076670127f935e62a66bdbd25d74f965c08092b6eaf4b2c7378902d46
6
+ metadata.gz: 3bd61e4e04378d305ce498782d28c84eb5a6a865b77629880981234d0d0a289f24aabe3086a18c241ba07906f69190d4786fd6c64080f5602375b19ee1bd9639
7
+ data.tar.gz: 7833808a65a37afd708004af4dd4c28bd22ef4725dc610d7bc33f5d1bdc7c27eefc97258a0bac5a00f29feaa4809a128229109a51ecb09d3baf1115cecc9f34f
@@ -41,6 +41,8 @@ module ZuoraConnect
41
41
  if defined?(Redis.current)
42
42
  Redis.current.zadd("APILimits", 9999999999, "placeholder")
43
43
  Redis.current.zadd("InstanceRefreshing", 9999999999, "placeholder")
44
+ end
45
+ if defined?(Resque.redis)
44
46
  Resque.redis.zadd("PauseQueue", 9999999999, "placeholder")
45
47
  end
46
48
  end
@@ -49,7 +51,10 @@ module ZuoraConnect
49
51
  begin
50
52
  Apartment::Tenant.switch!(self.id) if self.persisted?
51
53
  rescue Apartment::TenantNotFound => ex
52
- Apartment::Tenant.create(self.id.to_s)
54
+ begin
55
+ Apartment::Tenant.create(self.id.to_s)
56
+ rescue Apartment::TenantExists => ex
57
+ end
53
58
  retry
54
59
  end
55
60
  if migrate && ActiveRecord::Migrator.needs_migration?
@@ -235,15 +240,16 @@ module ZuoraConnect
235
240
  elsif type == "stats"
236
241
  begin
237
242
  Resque.redis.ping
243
+ @resque = Resque.info
238
244
  @data = {
239
245
  app_name: ZuoraConnect::Telegraf.app_name,
240
246
  url: "dummy",
241
247
  Resque:{
242
- Jobs_Finished: Resque.info[:processed] ,
243
- Jobs_Failed: Resque.info[:failed],
244
- Jobs_Pending: Resque.info[:pending],
245
- Workers_Active: Resque.info[:working],
246
- Workers_Total: Resque.info[:workers]
248
+ Jobs_Finished: @resque[:processed] ,
249
+ Jobs_Failed: @resque[:failed],
250
+ Jobs_Pending: @resque[:pending],
251
+ Workers_Active: @resque[:working],
252
+ Workers_Total: @resque[:workers]
247
253
  }
248
254
  }
249
255
  rescue
@@ -483,7 +489,6 @@ module ZuoraConnect
483
489
  Rails.logger.debug("[#{self.id}] Caching AppInstance")
484
490
  Redis.current.setex("AppInstance:#{self.id}", INSTANCE_REDIS_CACHE_PERIOD.to_i, self.encrypt_data(data: self.save_data))
485
491
  end
486
- Redis.current.del("Deleted:#{self.id}")
487
492
  end
488
493
  end
489
494
 
@@ -1,4 +1,4 @@
1
- class CreateConnectAppInstances < ActiveRecord::Migration
1
+ class CreateConnectAppInstances < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  if !ActiveRecord::Base.connection.table_exists?('zuora_connect_app_instances')
4
4
  create_table :zuora_connect_app_instances do |t|
@@ -1,4 +1,4 @@
1
- class AddTokensToAppInstance < ActiveRecord::Migration
1
+ class AddTokensToAppInstance < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :access_token, :string unless column_exists? :zuora_connect_app_instances, :access_token
4
4
  add_column :zuora_connect_app_instances, :refresh_token, :string unless column_exists? :zuora_connect_app_instances, :refresh_token
@@ -1,4 +1,4 @@
1
- class AddTokenToAppInstance < ActiveRecord::Migration
1
+ class AddTokenToAppInstance < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :token, :string unless column_exists? :zuora_connect_app_instances, :token
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddSessionsTable < ActiveRecord::Migration
1
+ class AddSessionsTable < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  if !ActiveRecord::Base.connection.table_exists?('sessions')
4
4
  create_table :sessions do |t|
@@ -1,4 +1,4 @@
1
- class AddExpirationToAppInstance < ActiveRecord::Migration
1
+ class AddExpirationToAppInstance < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :oauth_expires_at, :datetime unless column_exists? :zuora_connect_app_instances, :oauth_expires_at
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddNewApiToken < ActiveRecord::Migration
1
+ class AddNewApiToken < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :api_token, :string unless column_exists? :zuora_connect_app_instances, :api_token
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddCatalogDataToAppInstance < ActiveRecord::Migration
1
+ class AddCatalogDataToAppInstance < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :catalog_updated_at, :datetime unless column_exists? :zuora_connect_app_instances, :catalog_updated_at
4
4
  add_column :zuora_connect_app_instances, :catalog, :jsonb, default: {} unless column_exists? :zuora_connect_app_instances, :catalog
@@ -1,4 +1,4 @@
1
- class AddCatalogMappingsToAppInstance < ActiveRecord::Migration
1
+ class AddCatalogMappingsToAppInstance < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :catalog_mapping, :jsonb, default: {} unless column_exists? :zuora_connect_app_instances, :catalog_mapping
4
4
  end
@@ -1,4 +1,4 @@
1
- class CatalogDefault < ActiveRecord::Migration
1
+ class CatalogDefault < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  change_column :zuora_connect_app_instances, :catalog, :jsonb, default: {}
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddCatalogAttemptedAt < ActiveRecord::Migration
1
+ class AddCatalogAttemptedAt < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :catalog_update_attempt_at, :datetime unless column_exists? :zuora_connect_app_instances, :catalog_update_attempt_at
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddFieldsToInstance < ActiveRecord::Migration
1
+ class AddFieldsToInstance < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :zuora_connect_app_instances, :name, :string, default: "" unless column_exists? :zuora_connect_app_instances, :name
4
4
  end
@@ -1,3 +1,3 @@
1
1
  module ZuoraConnect
2
- VERSION = "1.7.70"
2
+ VERSION = "1.7.71"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.70
4
+ version: 1.7.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-26 00:00:00.000000000 Z
11
+ date: 2019-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apartment