-
Notifications
You must be signed in to change notification settings - Fork 898
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
Format time interval for log message #15370
Format time interval for log message #15370
Conversation
c87511e
to
8aa72fd
Compare
@miq-bot assign @gtanzillo |
8aa72fd
to
a3fd4bd
Compare
app/models/miq_task.rb
Outdated
@@ -40,7 +40,7 @@ class MiqTask < ApplicationRecord | |||
def self.update_status_for_timed_out_active_tasks | |||
MiqTask.active.timed_out.no_associated_job.find_each do |task| | |||
task.update_status(STATE_FINISHED, STATUS_ERROR, | |||
"Task [#{task.id}] timed out - not active for more than #{::Settings.task.active_task_timeout}") | |||
"Task [#{task.id}] timed out - not active for more than #{::Settings.task.active_task_timeout.tr(".", " ")}") |
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.
Maybe do it this way because, although it doesn't read as nicely, it's safer -
"#{::Settings.task.active_task_timeout.to_i_with_method} seconds"
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.
👍
a3fd4bd
to
2f71cb4
Compare
Checked commit yrudman@2f71cb4 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
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.
LGTM 👍
Fine backport details:
|
…n-task-expired Format time interval for log message (cherry picked from commit 0f95dd1) https://bugzilla.redhat.com/show_bug.cgi?id=1460349
…n-task-expired Format time interval for log message (cherry picked from commit 0f95dd1) https://bugzilla.redhat.com/show_bug.cgi?id=1457979
Euwe backport details:
|
ISSUE: Time interval (when task got expired) recorded to log exactly as present in settings.yaml. Example:
10.minutes
but should be10 minutes
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1457979
@miq-bot add-label bug, core
\cc @gtanzillo