Skip to content

Commit df32442

Browse files
review @pcrespov
1 parent 12cd685 commit df32442

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

services/resource-usage-tracker/src/simcore_service_resource_usage_tracker/services/process_message_running_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ async def _process_stop_event(
295295
msg.created_at,
296296
running_service.pricing_unit_cost,
297297
)
298-
# NOTE: Include_pending_transactions=False will ensure that we do not count the current running transactions.
299-
# This is important because we are closing the transaction now and we do not want to count it again.
300298
wallet_total_credits_without_pending_transactions = (
299+
# NOTE: Include_pending_transactions=False will ensure that we do not count the current running transactions.
300+
# This is important because we are closing the transaction now and we do not want to count it again.
301301
await credit_transactions_db.sum_wallet_credits(
302302
db_engine,
303303
product_name=running_service.product_name,

services/resource-usage-tracker/tests/unit/with_dbs/test_api_credit_transactions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pytest
77
import sqlalchemy as sa
88
from faker import Faker
9+
from fastapi import FastAPI
910
from models_library.api_schemas_resource_usage_tracker.credit_transactions import (
1011
CreditTransactionCreateBody,
1112
WalletTotalCredits,
@@ -529,7 +530,7 @@ async def test_sum_wallet_credits_db(
529530
resource_tracker_setup_db: None,
530531
rpc_client: RabbitMQRPCClient,
531532
product_name: ProductName,
532-
initialized_app,
533+
initialized_app: FastAPI,
533534
):
534535
engine = initialized_app.state.engine
535536
output_including_pending_transaction = (

0 commit comments

Comments
 (0)