Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature: Store daemon options in Redis #13

Draft
wants to merge 2 commits into
base: development
Choose a base branch
from
Draft
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: 3 additions & 0 deletions bin/ncbo_cron
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ncbo_cron/ontology_pull.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down