-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e977386
commit a5bdaef
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ def perform(integration:) | |
end | ||
end | ||
end | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
app/jobs/integrations/hubspot/properties/deploy_contacts_job.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module Integrations | ||
module Hubspot | ||
module Properties | ||
class DeployContactsJobs < ApplicationJob | ||
queue_as 'integrations' | ||
|
||
retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 3 | ||
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 10 | ||
|
||
def perform(integration:) | ||
pp "job que faz cenas" | ||
#result = Integrations::Hubspot::Properties::DeployContactsService.call(integration:) | ||
#result.raise_if_error! | ||
end | ||
end | ||
end | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
spec/jobs/integrations/aggregator/sync_custom_objects_and_properties_job_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe Integrations::Aggregator::SyncCustomObjectsAndPropertiesJob, type: :job do | ||
describe '#perform' do | ||
subject(:sync_custom_objects_job) { described_class } | ||
|
||
let(:integration) { create(:hubspot_integration) } | ||
|
||
it 'enqueues the jobs to send objects and properties to hubspot' do | ||
described_class.perform_now(integration:) | ||
end | ||
end | ||
end |