From 0bd9db2403847721bf402129a8c69daf09590b8d Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Sat, 15 Apr 2023 14:01:56 +0100 Subject: [PATCH 1/2] store daemon options in Redis --- bin/ncbo_cron | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/ncbo_cron b/bin/ncbo_cron index a7fbc686..a528a428 100755 --- a/bin/ncbo_cron +++ b/bin/ncbo_cron @@ -214,6 +214,9 @@ runner.execute do |opts| redis = Redis.new(host: opts[:redis_host], port: opts[:redis_port]) puts "Running ncbo_cron with redis: #{redis.inspect}" + # Store daemon options in Redis (only if called in daemonized mode) + redis.set("cron:daemon:options", options.to_h.to_json) if options[:daemonize] + # If we're viewing queued entries, show them and quit if opts[:view_queue] parser = NcboCron::Models::OntologySubmissionParser.new From 430796c426dd37bbebcadbf4309f921d70670e0b Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Mon, 29 May 2023 03:36:46 +0200 Subject: [PATCH 2/2] fix a bug in ontology pull using a private method --- lib/ncbo_cron/ontology_pull.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ncbo_cron/ontology_pull.rb b/lib/ncbo_cron/ontology_pull.rb index 1a6db3ad..31f8cba9 100644 --- a/lib/ncbo_cron/ontology_pull.rb +++ b/lib/ncbo_cron/ontology_pull.rb @@ -74,7 +74,7 @@ def do_ontology_pull(ontology_acronym, enable_pull_umls: false, isLong: false, u last.bring(:uploadFilePath) if last.bring?(:uploadFilePath) - if self.not_pull_submission(last, ont, isLong, enable_pull_umls, options) + if not_pull_submission(last, ont, isLong, enable_pull_umls, options) raise StandardError, "Pull umls not enabled" end