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

honor storage_file_collection_time_utc setting #18585

Merged

Conversation

BrandtWoolf
Copy link
Contributor

@BrandtWoolf BrandtWoolf commented Mar 22, 2019

Currently the storage_file_collection_time_utc setting is not honored, instead the seconds setting is disregarded and its just sets the time to midnight utc.

Default Setting:

...
:workers:
  ...
  :worker_base:
    ...
    :schedule_worker:
       ...
       :storage_file_collection_time_utc: 21600
...

Current operation of adding the seconds to the current date being disregarded:

irb(main):061:0> at=21600
=> 21600
irb(main):062:0> Time.now.strftime("%Y-%m-%d #{at}").to_time(:utc)
=> 2019-03-22 00:00:00 UTC

Changes to support adding the defined seconds to the beginning of the current day:

irb(main):061:0> at=21600
=> 21600
irb(main):063:0>Time.zone.today.to_time(:utc) + at.seconds
=> 2019-03-22 06:00:00 UTC

This was the simplest change but it might be worth adjusting the default setting to more align with other time settings and define it as x.seconds

fixes #18586

@BrandtWoolf BrandtWoolf force-pushed the honor_storage_file_collection_time_utc branch from 72dc095 to 3ebe5d4 Compare March 22, 2019 21:16
@miq-bot
Copy link
Member

miq-bot commented Mar 22, 2019

Checked commit BrandtWoolf@3ebe5d4 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@bdunne bdunne merged commit 8679a53 into ManageIQ:master May 15, 2019
@bdunne bdunne added this to the Sprint 112 Ending May 27, 2019 milestone May 15, 2019
@bdunne bdunne self-assigned this May 15, 2019
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.

storage_file_collection_time_utc not honored, instead midnight is default
3 participants