Skip to content

Commit

Permalink
fix circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
monyarm committed Jan 16, 2024
1 parent 8a05f04 commit b4e6fe5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker-compose.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let
environment = ["COMPOSE_PROJECT_NAME"];
redis_depend = {redis = {condition = "service_healthy";};};
balance_verifier_level = level: {
command = "balance_verification --redis redis://redis:6379 --level ${level} --mock true";
command = "balance_verification --redis redis://redis:6379 --level ${builtins.toString level} --mock true";
depends_on =
{
commitment_mapper = {condition = "service_started";};
Expand All @@ -13,19 +13,19 @@ let
}
// redis_depend
// (
if (level != "0")
if (level > 0)
then {
"balance_verifier_level_${level}" = {condition = "service_completed_successfully";};
"balance_verifier_level_${builtins.toString (level - 1)}" = {condition = "service_completed_successfully";};
}
else {}
);
entrypoint = "";
inherit environment ports;
image = "balance-verifier-for-level-${level}";
image = "balance-verifier-for-level-${builtins.toString level}";
};
allLevels = builtins.map builtins.toString [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37];
allLevels = [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37];
balance_verifier_all_levels = builtins.listToAttrs (builtins.map (level: {
name = "balance_verifier_level_${level}";
name = "balance_verifier_level_${builtins.toString level}";
value = balance_verifier_level level;
})
allLevels);
Expand Down

0 comments on commit b4e6fe5

Please sign in to comment.