Skip to content

Commit

Permalink
removed temporary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Sep 12, 2023
1 parent bb8a374 commit e899656
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from typing import Final

from models_library.wallets import WalletID
from pydantic import AnyHttpUrl, AnyUrl, BaseModel, Field, validator

from ..clusters import ClusterID
Expand All @@ -9,8 +6,6 @@
from ..projects_pipeline import ComputationTask
from ..users import UserID

TEMPORARY_DEFAULT_WALLET_ID: Final[WalletID] = 43


class ComputationGet(ComputationTask):
url: AnyHttpUrl = Field(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import logging
from typing import Final

from models_library.api_schemas_directorv2.comp_tasks import TEMPORARY_DEFAULT_WALLET_ID
from models_library.clusters import BaseCluster, ClusterTypeInModel
from models_library.rpc_schemas_clusters_keeper.clusters import (
ClusterState,
OnDemandCluster,
)
from models_library.users import UserID
from models_library.wallets import WalletID
from servicelib.rabbitmq import (
RabbitMQRPCClient,
RemoteMethodNotRegisteredError,
Expand All @@ -21,6 +22,8 @@

_logger = logging.getLogger(__name__)

_TEMPORARY_DEFAULT_WALLET_ID: Final[WalletID] = 43


async def get_or_create_on_demand_cluster(
user_id: UserID, rabbitmq_rpc_client: RabbitMQRPCClient
Expand All @@ -31,7 +34,7 @@ async def get_or_create_on_demand_cluster(
RPCMethodName("get_or_create_cluster"),
timeout_s=300,
user_id=user_id,
wallet_id=TEMPORARY_DEFAULT_WALLET_ID,
wallet_id=_TEMPORARY_DEFAULT_WALLET_ID,
)
_logger.info("received cluster: %s", returned_cluster)
if returned_cluster.state is not ClusterState.RUNNING:
Expand Down

0 comments on commit e899656

Please sign in to comment.