Skip to content

Commit

Permalink
Merge pull request #83 from deNBI/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
eKatchko authored Jun 10, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents f0b7092 + 5164c91 commit 2917942
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,9 @@ updates:
interval: "weekly"
target-branch: "dev"
reviewers:
- "deNBI/portal-dev"
- "vktrrdk"
- "eKatchko"
- "dweinholz"
commit-message:
prefix: "feat"
include: "scope"
@@ -18,7 +20,9 @@ updates:
interval: "weekly"
target-branch: "dev"
reviewers:
- "deNBI/portal-dev"
- "vktrrdk"
- "eKatchko"
- "dweinholz"
commit-message:
prefix: "feat"
include: "scope"
6 changes: 3 additions & 3 deletions project_usage_exporter.py
Original file line number Diff line number Diff line change
@@ -253,10 +253,10 @@ def get_instance_weight(self, metric_tag, metric_amount, started_date):
instance_started_timestamp = datetime.strptime(started_date, "%Y-%m-%dT%H:%M:%S.%f").timestamp()
if self.weights is not None and len(self.weights) != 0:
sorted_timestamps = sorted(self.weights.keys())
max_timestamp = max(sorted_timestamps)
min_timestamp = min(sorted_timestamps)
associated_weights = None
for timestamp in sorted_timestamps:
if instance_started_timestamp <= timestamp or max_timestamp == timestamp:
for timestamp in sorted_timestamps[::-1]:
if instance_started_timestamp >= timestamp or min_timestamp == timestamp:
associated_weights = self.weights[timestamp]
break
if associated_weights is not None:

0 comments on commit 2917942

Please sign in to comment.