Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ class Config:
]
}

@validator("owner", pre=True, always=True)
@classmethod
def check_not_null(cls, v, values):
if values["value"] is True and v is None:
msg = "value cannot be None when project is locked"
raise ValueError(msg)
return v

@validator("status", always=True)
@classmethod
def check_status_compatible(cls, v, values):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ async def removal_policy_task(app: FastAPI) -> None:
efs_project_ids: list[
ProjectID
] = await efs_manager.list_projects_across_whole_efs()
_logger.info(
"Number of projects that are currently in the EFS file system: %s",
len(efs_project_ids),
)

projects_repo = ProjectsRepo(app.state.engine)
for project_id in efs_project_ids:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

_logger = logging.getLogger(__name__)

_SEC = 1000 # in ms
_MIN = 60 * _SEC # in ms
_HOUR = 60 * _MIN # in ms
_SEC = 1 # in s
_MIN = 60 * _SEC # in s
_HOUR = 60 * _MIN # in s


class EfsGuardianBackgroundTask(TypedDict):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def _subscribe_to_rabbitmq(app) -> str:
def _on_app_startup(app: FastAPI) -> Callable[[], Awaitable[None]]:
async def _startup() -> None:
with log_context(
_logger, logging.INFO, msg="setup resource tracker"
_logger, logging.INFO, msg="setup efs guardian process messages"
), log_catch(_logger, reraise=False):
app_settings: ApplicationSettings = app.state.settings
app.state.efs_guardian_rabbitmq_consumer = None
Expand Down
Loading