Files
colony/role_settings.py
T
ciomek b38e290309
Build and Push Docker Image / build-and-push (push) Successful in 6s
replicator
2026-09-20 21:49:31 +02:00

64 lines
1.7 KiB
Python

from colony.core.roles.explorer.role import Explorer
from colony.core.roles.replicator.role import Replicator
from colony.core.roles.unit.role import Unit
from colony.role_registry import RoleStats, HardwarePreferences, RolePriority, HardwareType
from colony.core.roles.foreman.role import Foreman
from colony.core.roles.gateway.role import Gateway
from colony.core.roles.gossip.role import Gossip
from colony.core.roles.vaultwarden.role import VaultWarden
from colony.core.roles.webview.role import WebView
available_roles = [
RoleStats(
cls=Unit,
priority=RolePriority.GENERAL,
),
RoleStats(
cls=Gossip,
priority=RolePriority.GENERAL,
),
RoleStats(
cls=Foreman,
priority=RolePriority.GENERAL,
),
RoleStats(
cls=VaultWarden,
priority=RolePriority.CRITICAL,
hardware_preferences=HardwarePreferences(
{
HardwareType.DISK_SPACE: 1,
HardwareType.LONGEVITY: 3,
}
)
),
RoleStats(
cls=Explorer,
priority=RolePriority.HIGH,
),
RoleStats(
cls=WebView,
priority=RolePriority.LOW,
hardware_preferences=HardwarePreferences(
{
HardwareType.LONGEVITY: 3,
}
),
on_demand=True,
),
RoleStats(
cls=Gateway,
priority=RolePriority.GENERAL,
),
RoleStats(
cls=Replicator,
priority=RolePriority.CRITICAL,
hardware_preferences=HardwarePreferences(
{
HardwareType.DISK_SPACE: 1,
HardwareType.LONGEVITY: 3,
}
),
minimal_percentage=51
)
]