Skip to content
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

Conversation

yrudman
Copy link
Contributor

@yrudman yrudman commented Jun 14, 2017

ISSUE: Time interval (when task got expired) recorded to log exactly as present in settings.yaml. Example: 10.minutes but should be 10 minutes

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1457979

@miq-bot add-label bug, core

\cc @gtanzillo

@yrudman yrudman force-pushed the fix-time-format-in-logging-wjen-task-expired branch from c87511e to 8aa72fd Compare June 14, 2017 17:06
@yrudman
Copy link
Contributor Author

yrudman commented Jun 14, 2017

@miq-bot assign @gtanzillo

@yrudman
Copy link
Contributor Author

yrudman commented Jun 14, 2017

This PR is follow-up to #15231

@miq-bot add-label euwe/yes, fine/yes

@yrudman yrudman force-pushed the fix-time-format-in-logging-wjen-task-expired branch from 8aa72fd to a3fd4bd Compare June 15, 2017 13:43
@@ -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(".", " ")}")
Copy link
Member

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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@yrudman yrudman force-pushed the fix-time-format-in-logging-wjen-task-expired branch from a3fd4bd to 2f71cb4 Compare June 16, 2017 17:33
@miq-bot
Copy link
Member

miq-bot commented Jun 16, 2017

Checked commit yrudman@2f71cb4 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@gtanzillo gtanzillo added this to the Sprint 63 Ending Jun 19, 2017 milestone Jun 16, 2017
@gtanzillo gtanzillo merged commit 0f95dd1 into ManageIQ:master Jun 16, 2017
@yrudman yrudman deleted the fix-time-format-in-logging-wjen-task-expired branch June 16, 2017 19:33
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit d0843bc3954f8e4e87e193aa67f7fd979e16baa0
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Fri Jun 16 14:16:01 2017 -0400

    Merge pull request #15370 from yrudman/fix-time-format-in-logging-wjen-task-expired
    
    Format time interval for log message
    (cherry picked from commit 0f95dd196c38d68e6a078822c3f8c3086c42e07b)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1460349

simaishi pushed a commit that referenced this pull request Jun 16, 2017
…n-task-expired

Format time interval for log message
(cherry picked from commit 0f95dd1)

https://bugzilla.redhat.com/show_bug.cgi?id=1460349
simaishi pushed a commit that referenced this pull request Jun 30, 2017
…n-task-expired

Format time interval for log message
(cherry picked from commit 0f95dd1)

https://bugzilla.redhat.com/show_bug.cgi?id=1457979
@simaishi
Copy link
Contributor

Euwe backport details:

$ git log -1
commit 8935ee4b9c5cc61b39745fb7a8de10f80bf75b0b
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Fri Jun 16 14:16:01 2017 -0400

    Merge pull request #15370 from yrudman/fix-time-format-in-logging-wjen-task-expired
    
    Format time interval for log message
    (cherry picked from commit 0f95dd196c38d68e6a078822c3f8c3086c42e07b)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1457979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants