Skip to content

Commit

Permalink
Revert "fix(netsuite): Aggregator jobs should be unique (#2818)" (#2855)
Browse files Browse the repository at this point in the history
This reverts commit 0d43376.

## Context

There is a activejob-uniqueness bug that does not enqueue integration
jobs.

when using named arguments
  • Loading branch information
ivannovosad authored Nov 22, 2024
1 parent 09d0017 commit e890bca
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions app/jobs/fees/create_pay_in_advance_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ module Fees
class CreatePayInAdvanceJob < ApplicationJob
queue_as :default

unique :until_executed, on_conflict: :log

def perform(charge:, event:, billing_at: nil)
result = Fees::CreatePayInAdvanceService.call(charge:, event:, billing_at:)

Expand Down
2 changes: 0 additions & 2 deletions app/jobs/integrations/aggregator/credit_notes/create_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module CreditNotes
class CreateJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 3
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100

Expand Down
2 changes: 0 additions & 2 deletions app/jobs/integrations/aggregator/invoices/create_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module Invoices
class CreateJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 3
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Crm
class CreateCustomerAssociationJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 10
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100

Expand Down
2 changes: 0 additions & 2 deletions app/jobs/integrations/aggregator/invoices/crm/create_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Crm
class CreateJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 10
retry_on Integrations::Aggregator::BasePayload::Failure, wait: :polynomially_longer, attempts: 10
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100
Expand Down
2 changes: 0 additions & 2 deletions app/jobs/integrations/aggregator/invoices/crm/update_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Crm
class UpdateJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 10
retry_on Integrations::Aggregator::BasePayload::Failure, wait: :polynomially_longer, attempts: 10
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100
Expand Down
2 changes: 0 additions & 2 deletions app/jobs/integrations/aggregator/payments/create_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module Payments
class CreateJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 5
retry_on Integrations::Aggregator::BasePayload::Failure, wait: :polynomially_longer, attempts: 10
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Crm
class CreateCustomerAssociationJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 10
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Crm
class CreateJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 10
retry_on Integrations::Aggregator::BasePayload::Failure, wait: :polynomially_longer, attempts: 10
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Crm
class UpdateJob < ApplicationJob
queue_as 'integrations'

unique :until_executed, on_conflict: :log

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 10
retry_on Integrations::Aggregator::BasePayload::Failure, wait: :polynomially_longer, attempts: 10
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 100
Expand Down
2 changes: 0 additions & 2 deletions app/jobs/invoices/create_pay_in_advance_charge_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class CreatePayInAdvanceChargeJob < ApplicationJob

retry_on Sequenced::SequenceError

unique :until_executed, on_conflict: :log

def perform(charge:, event:, timestamp:, invoice: nil)
result = Invoices::CreatePayInAdvanceChargeService.call(charge:, event:, timestamp:, invoice:)
return if result.success?
Expand Down

0 comments on commit e890bca

Please sign in to comment.