diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0ec226f..3795399 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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" diff --git a/project_usage_exporter.py b/project_usage_exporter.py index f7d8a33..bef4cfe 100755 --- a/project_usage_exporter.py +++ b/project_usage_exporter.py @@ -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: