-
Notifications
You must be signed in to change notification settings - Fork 20
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
Worker Init/Final Log on Datapoint #482
Conversation
|
||
# First check if there is a file that indicates the gem has already been updated. | ||
# We only need to update the bundle once / worker, not every time a data point is initialized. | ||
echo "Checking if Gemfile has been updated in ${GEMFILEUPDATE}" |
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.
should we do this at the start?
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.
yeah, that would make more sense.
ensure | ||
# save the log information to the datapoint if it exists | ||
if File.exist? log_path | ||
@data_point.worker_logs[script_name] = File.read(log_path).lines |
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.
i like this update. the logs are also downloaded w/data point zip file.
Project.destroy_all | ||
Delayed::Job.destroy_all | ||
rescue Errno::EACCES => e | ||
puts "Cannot unlink files, will try and continue" |
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.
nice!
Thanks @nllong! |
Upon merging have this page reference the script in the PR.