mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 15:06:23 +02:00
fix: improve company registry data processing
- Switch company_register branch to issues-with-upcoming-data - Convert ident to string when querying company data - Add extended logging in CompanyRegisterStatusJob - Disable automatic merging in renovate.json Technical changes: - Update dependencies: date, net-protocol, net-smtp, timeout
This commit is contained in:
parent
89097bfabe
commit
45c77f7052
4 changed files with 11 additions and 10 deletions
2
Gemfile
2
Gemfile
|
@ -67,8 +67,6 @@ gem 'jquery-ui-rails', '6.0.1'
|
|||
gem 'pdfkit'
|
||||
gem 'redis'
|
||||
gem 'sidekiq', '~> 7.0'
|
||||
|
||||
|
||||
gem 'company_register', github: 'internetee/company_register', branch: :master
|
||||
gem 'domain_name'
|
||||
gem 'e_invoice', github: 'internetee/e_invoice', branch: :master
|
||||
|
|
12
Gemfile.lock
12
Gemfile.lock
|
@ -1,7 +1,7 @@
|
|||
GIT
|
||||
remote: https://github.com/internetee/company_register.git
|
||||
revision: 30b2c4d2f0bb882370e174fc965cd9fd02b42951
|
||||
branch: master
|
||||
revision: d74af7ac588ba5b767ec425a37385de3b715145d
|
||||
branch: issues-with-upcoming-data
|
||||
specs:
|
||||
company_register (0.1.0)
|
||||
activesupport
|
||||
|
@ -214,7 +214,7 @@ GEM
|
|||
activerecord (>= 5.a)
|
||||
database_cleaner-core (~> 2.0.0)
|
||||
database_cleaner-core (2.0.1)
|
||||
date (3.3.4)
|
||||
date (3.4.1)
|
||||
devise (4.8.0)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
|
@ -347,9 +347,9 @@ GEM
|
|||
net-protocol
|
||||
net-pop (0.1.2)
|
||||
net-protocol
|
||||
net-protocol (0.1.3)
|
||||
net-protocol (0.2.2)
|
||||
timeout
|
||||
net-smtp (0.3.3)
|
||||
net-smtp (0.5.0)
|
||||
net-protocol
|
||||
netrc (0.11.0)
|
||||
newrelic-infinite_tracing (8.1.0)
|
||||
|
@ -520,7 +520,7 @@ GEM
|
|||
tilt (2.0.11)
|
||||
time (0.3.0)
|
||||
date
|
||||
timeout (0.3.0)
|
||||
timeout (0.4.3)
|
||||
truemail (3.0.3)
|
||||
simpleidn (~> 0.2.1)
|
||||
tzinfo (2.0.6)
|
||||
|
|
|
@ -75,15 +75,18 @@ class CompanyRegisterStatusJob < ApplicationJob
|
|||
end
|
||||
|
||||
def delete_process(contact)
|
||||
Rails.logger.info("Processing company details for contact #{contact.id} with ident: #{contact.ident} (#{contact.ident.class})")
|
||||
company_details_response = contact.return_company_details
|
||||
|
||||
if company_details_response.empty?
|
||||
Rails.logger.info("Empty company details response for contact #{contact.id}")
|
||||
schedule_force_delete(contact)
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
kandeliik_tekstina = extract_kandeliik_tekstina(company_details_response)
|
||||
Rails.logger.info("Kandeliik tekstina for contact #{contact.id}: #{kandeliik_tekstina}")
|
||||
|
||||
if kandeliik_tekstina == PAYMENT_STATEMENT_BUSINESS_REGISTRY_REASON
|
||||
soft_delete_company(contact)
|
||||
|
|
|
@ -26,8 +26,8 @@ module Contact::CompanyRegister
|
|||
|
||||
def return_company_details
|
||||
return unless org?
|
||||
|
||||
company_register.company_details(registration_number: ident)
|
||||
|
||||
company_register.company_details(registration_number: ident.to_s)
|
||||
rescue CompanyRegister::NotAvailableError
|
||||
[]
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue