fixed method for check force delete

This commit is contained in:
oleghasjanov 2024-09-25 11:22:17 +03:00
parent 61497deb2a
commit a13ef33628
3 changed files with 52 additions and 30 deletions

View file

@ -69,7 +69,7 @@ gem 'redis'
gem 'sidekiq', '~> 7.0'
gem 'company_register', github: 'internetee/company_register',
branch: 'master'
branch: '4-check-for-company-existence'
gem 'domain_name'
gem 'e_invoice', github: 'internetee/e_invoice', branch: :master
gem 'haml', '~> 6.0'

View file

@ -1,7 +1,7 @@
GIT
remote: https://github.com/internetee/company_register.git
revision: 4181b2fff9080e2d87d15612561131f9e3fdfb4c
branch: master
revision: 6465d5c49478b9de5a5fa009cb6b8123b3956dd1
branch: 4-check-for-company-existence
specs:
company_register (0.1.0)
activesupport
@ -139,14 +139,15 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
aes_key_wrap (1.1.0)
airbrake (11.0.3)
airbrake-ruby (~> 5.1)
airbrake-ruby (5.2.0)
rbtree3 (~> 0.5)
akami (1.3.1)
akami (1.3.3)
base64
gyoku (>= 0.4.0)
nokogiri
apipie-rails (0.6.0)
@ -167,14 +168,16 @@ GEM
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.4)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.2.0)
bcrypt (3.1.16)
bigdecimal (3.1.8)
bindata (2.4.14)
bootsnap (1.17.1)
msgpack (~> 1.2)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
builder (3.2.4)
builder (3.3.0)
cancancan (3.3.0)
capybara (3.35.3)
addressable
@ -194,7 +197,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
countries (4.0.1)
i18n_data (~> 0.13.0)
@ -246,8 +249,9 @@ GEM
grpc (1.60.0-x86_64-linux)
google-protobuf (~> 3.25)
googleapis-common-protos-types (~> 1.0)
gyoku (1.3.1)
gyoku (1.4.0)
builder (>= 2.1.2)
rexml (~> 3.0)
haml (6.0.0)
temple (>= 0.8.2)
thor
@ -259,10 +263,12 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
httpi (2.4.5)
rack
socksify
i18n (1.14.5)
httpi (4.0.4)
base64
mutex_m
nkf
rack (>= 2.0, < 4)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
i18n_data (0.13.0)
isikukood (0.1.2)
@ -310,8 +316,8 @@ GEM
nokogiri (~> 1)
rake
mini_mime (1.1.5)
mini_portile2 (2.8.6)
minitest (5.18.1)
mini_portile2 (2.8.7)
minitest (5.25.1)
minitest-stub_any_instance (1.0.3)
monetize (1.9.4)
money (~> 6.12)
@ -323,9 +329,13 @@ GEM
money (~> 6.13.2)
railties (>= 3.0)
msgpack (1.7.2)
<<<<<<< HEAD
net-ftp (0.3.7)
net-protocol
time
=======
mutex_m (0.2.0)
>>>>>>> 5f9bc1f5e (fixed method for check force delete)
net-protocol (0.1.3)
timeout
net-smtp (0.3.3)
@ -336,12 +346,14 @@ GEM
newrelic_rpm (= 8.1.0)
newrelic_rpm (8.1.0)
nio4r (2.5.9)
nokogiri (1.16.5)
nkf (0.2.0)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
nori (2.6.0)
nori (2.7.1)
bigdecimal
omniauth (2.1.0)
hashie (>= 3.4.6)
rack (>= 2.2.3)
@ -373,11 +385,16 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
<<<<<<< HEAD
public_suffix (5.0.0)
puma (5.6.9)
=======
public_suffix (6.0.1)
puma (5.6.8)
>>>>>>> 5f9bc1f5e (fixed method for check force delete)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.8.1)
racc (1.8.1)
rack (2.2.9)
rack-oauth2 (1.21.3)
activesupport
attr_required
@ -449,14 +466,15 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
savon (2.12.1)
savon (2.15.1)
akami (~> 1.2)
builder (>= 2.1.2)
gyoku (~> 1.2)
httpi (~> 2.3)
httpi (>= 4, < 5)
mail (~> 2.5)
nokogiri (>= 1.8.1)
nori (~> 2.4)
wasabi (~> 3.4)
wasabi (>= 3.7, < 6)
select2-rails (4.0.13)
selectize-rails (0.12.6)
selenium-webdriver (3.142.7)
@ -474,7 +492,6 @@ GEM
simplecov-html (0.10.2)
simpleidn (0.2.3)
sixarm_ruby_unaccent (1.2.0)
socksify (1.7.1)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
@ -515,10 +532,10 @@ GEM
simpleidn
warden (1.2.9)
rack (>= 2.0.9)
wasabi (3.6.1)
wasabi (5.0.3)
addressable
httpi (~> 2.0)
nokogiri (>= 1.4.2)
faraday (>= 1.9, < 3)
nokogiri (>= 1.13.9)
webfinger (1.2.0)
activesupport
httpclient (>= 2.4)
@ -534,7 +551,7 @@ GEM
wkhtmltopdf-binary (0.12.6.6)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.13)
zeitwerk (2.6.18)
PLATFORMS
ruby
@ -611,4 +628,8 @@ DEPENDENCIES
wkhtmltopdf-binary (~> 0.12.6.1)
BUNDLED WITH
<<<<<<< HEAD
2.5.15
=======
2.5.19
>>>>>>> 5f9bc1f5e (fixed method for check force delete)

View file

@ -51,7 +51,7 @@ class CompanyRegisterStatusJob < ApplicationJob
def schedule_force_delete(contact)
contact.domains.each do |domain|
next if domain.schedule_force_delete?
next if domain.force_delete_scheduled?
domain.schedule_force_delete(
type: :fast_track,
@ -64,7 +64,7 @@ class CompanyRegisterStatusJob < ApplicationJob
def check_for_force_delete(contact)
contact.domains.any? && domain.status_notes[DomainStatus::FORCE_DELETE].include?("Company no: #{contact.ident}") do |domain|
domain.schedule_force_delete?
domain.force_delete_scheduled?
end
end
@ -77,6 +77,7 @@ class CompanyRegisterStatusJob < ApplicationJob
if company_details_response.empty?
schedule_force_delete(contact)
return
end