-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEV-1440 - write journal when indexing full file #62
Conversation
# "since" command for a month starts on the last day of last month | ||
# because there will generally be both an "upd" and a "full" file. | ||
call_since_command last_full_marc_file.to_datetime | ||
logger.info "Commit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The individual date commands commit, so we don't need to commit again afterwards (although it doesn't hurt)
# Calling the Thor "file" command. | ||
call_file_command file | ||
|
||
logger.info "Commit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, we were committing after loading deleted records, but not after we loaded the full file. We probably want to commit after we load the full file.
lib/services.rb
Outdated
@@ -104,4 +104,6 @@ def env_local_file | |||
Services.register(:collection_map) do | |||
CICTL::CollectionMap.new.to_translation_map | |||
end | |||
|
|||
Services.register(:job_name) { ENV.fetch("JOB_NAME",$PROGRAM_NAME) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without a default, running individual specs fails in inscrutable ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving aside the two standardrb gotchas. Less chaotic with the extracted methods. APPROVE
We were checking for a full journal file but not writing one when we did the full index, leading to a situation where regardless of journal file presence the "continue" command would do a full reindex every day.
68e2169
to
23e34e5
Compare
We were checking for a full journal file but not writing one when we did the full index, leading to a situation where regardless of journal file presence the "continue" command would do a full reindex every day.
This refactors the
all
command some, and tests that we are writing both the full and update journal files.