Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ group :test do
gem 'simplecov-cobertura' # for codecov.io
gem 'webmock', '~> 3.19.1'
gem 'webrick'
end
gem 'minitest-bisect'
end
59 changes: 34 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GIT

GIT
remote: https://github.com/ncbo/ncbo_cron.git
revision: c4f16085b3e34b1e38e30232988297016e1f0e39
revision: 111c7263d8a98b1e8f7c033cb0b7d9c6cc10cd01
branch: develop
specs:
ncbo_cron (0.0.1)
Expand Down Expand Up @@ -142,15 +142,16 @@ GEM
rexml
cube-ruby (0.0.3)
dante (0.2.0)
date (3.4.1)
date (3.5.0)
docile (1.4.1)
domain_name (0.6.20240107)
drb (2.2.3)
ed25519 (1.4.0)
faraday (2.14.0)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-follow_redirects (0.3.0)
faraday-follow_redirects (0.4.0)
faraday (>= 1, < 3)
faraday-net_http (3.4.1)
net-http (>= 0.5.0)
Expand All @@ -167,7 +168,7 @@ GEM
ffi (1.17.2-x86_64-darwin)
ffi (1.17.2-x86_64-linux-gnu)
ffi (1.17.2-x86_64-linux-musl)
gapic-common (1.0.1)
gapic-common (1.1.0)
faraday (>= 1.9, < 3.a)
faraday-retry (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
Expand All @@ -179,7 +180,7 @@ GEM
grpc (~> 1.66)
get_process_mem (0.2.7)
ffi (~> 1.0)
google-analytics-data (0.7.1)
google-analytics-data (0.7.2)
google-analytics-data-v1beta (>= 0.11, < 2.a)
google-cloud-core (~> 1.6)
google-analytics-data-v1beta (0.17.0)
Expand All @@ -205,39 +206,39 @@ GEM
grpc (~> 1.41)
googleapis-common-protos-types (1.20.0)
google-protobuf (>= 3.18, < 5.a)
googleauth (1.14.0)
googleauth (1.15.1)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
jwt (>= 1.4, < 3.0)
jwt (>= 1.4, < 4.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
grpc (1.74.0)
grpc (1.76.0)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-aarch64-linux-gnu)
grpc (1.76.0-aarch64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-aarch64-linux-musl)
grpc (1.76.0-aarch64-linux-musl)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-arm64-darwin)
grpc (1.76.0-arm64-darwin)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-x86-linux-gnu)
grpc (1.76.0-x86-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-x86-linux-musl)
grpc (1.76.0-x86-linux-musl)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-x86_64-darwin)
grpc (1.76.0-x86_64-darwin)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-x86_64-linux-gnu)
grpc (1.76.0-x86_64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.74.0-x86_64-linux-musl)
grpc (1.76.0-x86_64-linux-musl)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
haml (5.2.2)
Expand All @@ -253,7 +254,7 @@ GEM
json-schema (2.8.1)
addressable (>= 2.4)
json_pure (2.8.1)
jwt (2.10.2)
jwt (3.1.2)
base64
kgio (2.11.4)
language_server-protocol (3.17.0.5)
Expand All @@ -275,16 +276,22 @@ GEM
mime-types-data (3.2025.0924)
mini_mime (1.1.5)
minitest (5.26.0)
minitest-bisect (1.7.0)
minitest-server (~> 1.0)
path_expander (~> 1.1)
minitest-hooks (1.5.2)
minitest (> 5.3)
minitest-server (1.0.8)
drb (~> 2.0)
minitest (~> 5.16)
minitest-stub_any_instance (1.0.3)
mlanett-redis-lock (0.2.7)
redis
multi_json (1.17.0)
net-ftp (0.3.8)
net-ftp (0.3.9)
net-protocol
time
net-http (0.6.0)
net-http (0.7.0)
uri
net-http-persistent (2.9.4)
net-imap (0.5.12)
Expand All @@ -303,7 +310,7 @@ GEM
net-ssh (7.3.0)
netrc (0.11.0)
newrelic_rpm (9.19.0)
oj (3.16.11)
oj (3.16.12)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omni_logger (0.1.4)
Expand All @@ -315,6 +322,7 @@ GEM
parser (3.3.8.0)
ast (~> 2.4.1)
racc
path_expander (1.1.3)
pony (1.13.1)
mail (>= 2.0)
prism (1.4.0)
Expand Down Expand Up @@ -382,13 +390,13 @@ GEM
prism (~> 1.4)
ruby-progressbar (1.13.0)
ruby-xxHash (0.4.0.2)
rubyzip (3.2.1)
rubyzip (3.2.2)
rufus-scheduler (2.0.24)
tzinfo (>= 0.3.22)
signet (0.20.0)
signet (0.21.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
jwt (>= 1.5, < 4.0)
multi_json (~> 1.10)
simplecov (0.22.0)
docile (~> 1.1)
Expand Down Expand Up @@ -425,7 +433,7 @@ GEM
tilt (2.6.1)
time (0.4.1)
date
timeout (0.4.3)
timeout (0.4.4)
tzinfo (1.2.11)
thread_safe (~> 0.1)
unicode-display_width (3.1.4)
Expand All @@ -437,7 +445,7 @@ GEM
unicorn-worker-killer (0.4.5)
get_process_mem (~> 0)
unicorn (>= 4, < 7)
uri (1.0.4)
uri (1.1.1)
uuid (2.3.9)
macaddr (~> 1.0)
webmock (3.19.1)
Expand Down Expand Up @@ -479,6 +487,7 @@ DEPENDENCIES
haml (~> 5.2.2)
json-schema (~> 2.0)
minitest (~> 5.0)
minitest-bisect
minitest-hooks (~> 1.5)
minitest-stub_any_instance
multi_json
Expand Down
2 changes: 1 addition & 1 deletion controllers/ontology_submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class OntologySubmissionsController < ApplicationController
# Re-fetch ontology to avoid stale submissions cache
ont_refreshed = Ontology.find(params["acronym"]).include(submissions: :submissionId).first
new_latest_sub = ont_refreshed.latest_submission(status: :any)
NcboCron::Models::OntologySubmissionParser.new.queue_submission(new_latest_sub, all: true) if new_latest_sub
NcboCron::Models::OntologySubmissionParser.new.queue_submission(new_latest_sub, all: true) if new_latest_sub && ENV['RACK_ENV'] != 'test'
end

payload = { deleted_ids: deleted_ids, deleted_count: deleted_ids.size, missing_ids: missing }
Expand Down
3 changes: 2 additions & 1 deletion helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@ def process_long_operation(timeout, args = {}, &block)
end

# 4) Background work (toggle via fork: false in tests)
if args.fetch(:fork, true)
fork_process = ENV['RACK_ENV'] != 'test'
if fork_process
pid = Process.fork { worker.call }
Process.detach(pid)
else
Expand Down
4 changes: 2 additions & 2 deletions test/controllers/test_batch_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_class_wrong_params
}
}
post "/batch/", call_params
assert last_response.status = 422
assert_equal 422, last_response.status
end

def test_class_batch_multiple
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_class_all_bro
assert_equal classes.length, classes_response.length
classes_response.each do |klass|
assert_instance_of String, klass["prefLabel"]
assert klass["prefLabel"] == class_ids[klass["@id"]]
assert_equal klass["prefLabel"], class_ids[klass["@id"]]
end
end
end
Loading