Skip to content

Commit

Permalink
Merge pull request #84 from deNBI/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
eKatchko authored Jun 10, 2021
2 parents 4473a50 + 2917942 commit 5879cf2
Show file tree
Hide file tree
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
Expand Up @@ -6,7 +6,9 @@ updates:
interval: "weekly"
target-branch: "dev"
reviewers:
- "deNBI/portal-dev"
- "vktrrdk"
- "eKatchko"
- "dweinholz"
commit-message:
prefix: "feat"
include: "scope"
Expand All @@ -18,7 +20,9 @@ updates:
interval: "weekly"
target-branch: "dev"
reviewers:
- "deNBI/portal-dev"
- "vktrrdk"
- "eKatchko"
- "dweinholz"
commit-message:
prefix: "feat"
include: "scope"
Expand Down
6 changes: 3 additions & 3 deletions project_usage_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5879cf2

Please sign in to comment.