mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
updated to 1.7.20
This commit is contained in:
parent
0dfe2de8e5
commit
dab1db4141
67 changed files with 5236 additions and 2272 deletions
49
dist/ba_data/python/efro/cloudshell.py
vendored
Normal file
49
dist/ba_data/python/efro/cloudshell.py
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Released under the MIT License. See LICENSE for details.
|
||||
#
|
||||
"""My nifty ssh/mosh/rsync mishmash."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import Enum
|
||||
from dataclasses import dataclass
|
||||
|
||||
from efro.dataclassio import ioprepped
|
||||
|
||||
|
||||
class LockType(Enum):
|
||||
"""Types of locks that can be acquired on a host."""
|
||||
|
||||
HOST = 'host'
|
||||
WORKSPACE = 'workspace'
|
||||
PYCHARM = 'pycharm'
|
||||
CLION = 'clion'
|
||||
|
||||
|
||||
@ioprepped
|
||||
@dataclass
|
||||
class HostConfig:
|
||||
"""Config for a cloud machine to run commands on.
|
||||
|
||||
precommand, if set, will be run before the passed commands.
|
||||
Note that it is not run in interactive mode (when no command is given).
|
||||
"""
|
||||
|
||||
address: str | None = None
|
||||
user: str = 'ubuntu'
|
||||
port: int = 22
|
||||
mosh_port: int | None = None
|
||||
mosh_server_path: str | None = None
|
||||
mosh_shell: str = 'sh'
|
||||
workspaces_root: str = '/home/${USER}/cloudshell_workspaces'
|
||||
sync_perms: bool = True
|
||||
precommand: str | None = None
|
||||
managed: bool = False
|
||||
idle_minutes: int = 5
|
||||
can_sudo_reboot: bool = False
|
||||
max_sessions: int = 3
|
||||
reboot_wait_seconds: int = 20
|
||||
reboot_attempts: int = 1
|
||||
|
||||
def resolved_workspaces_root(self) -> str:
|
||||
"""Returns workspaces_root with standard substitutions."""
|
||||
return self.workspaces_root.replace('${USER}', self.user)
|
||||
Loading…
Add table
Add a link
Reference in a new issue