Skip to content

Commit

Permalink
Make sure the notifier component does not crash when starting up. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fniessink committed Jan 29, 2021
1 parent ea3cc18 commit b332d41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/notifier/src/quality_time_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ async def notify(log_level: int = None) -> NoReturn:
f"{os.environ.get('SERVER_PORT', '5001')}/api/{api_version}/reports"
)
data_model = await retrieve_data_model(api_version)
# needs to be aware for comparison in long_unchanged_status
most_recent_measurement_seen = datetime.max.isoformat() + "+00:00"
# needs to be timezone aware for comparison in long_unchanged_status
most_recent_measurement_seen = datetime.max.replace(microsecond=0).isoformat() + "+00:00"
outbox = Outbox()
notification_finder = NotificationFinder(data_model)
while True:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ class LongUnchangedTestCase(Base):

def setUp(self):
"""Override to set up a metric fixture."""
self.old_timestamp = "2019-02-01T00:00:00"
self.new_timestamp = "2020-02-01T00:00:00"
self.old_timestamp = "2019-02-01T00:00:00+00:00"
self.new_timestamp = "2020-02-01T00:00:00+00:00"
self.notification_finder = NotificationFinder(self.data_model)
self.red_metric = self.metric(
status="target_not_met",
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

- Make sure the notifier component does not crash when .... Fixes [#1830](https://github.com/ICTU/quality-time/issues/1830).
- Make sure the notifier component does not crash when starting up. Fixes [#1830](https://github.com/ICTU/quality-time/issues/1830).

## [3.17.1] - [2021-01-24]

Expand Down

0 comments on commit b332d41

Please sign in to comment.