Skip to content

Commit 4219904

Browse files
fix & improvements:
1 parent ea88f43 commit 4219904

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

packages/models-library/src/models_library/projects_state.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ class Config:
8080
]
8181
}
8282

83-
@validator("owner", pre=True, always=True)
84-
@classmethod
85-
def check_not_null(cls, v, values):
86-
if values["value"] is True and v is None:
87-
msg = "value cannot be None when project is locked"
88-
raise ValueError(msg)
89-
return v
90-
9183
@validator("status", always=True)
9284
@classmethod
9385
def check_status_compatible(cls, v, values):

services/efs-guardian/src/simcore_service_efs_guardian/services/background_tasks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ async def removal_policy_task(app: FastAPI) -> None:
3434
efs_project_ids: list[
3535
ProjectID
3636
] = await efs_manager.list_projects_across_whole_efs()
37+
_logger.info(
38+
"Number of projects that are currently in the EFS file system: %s",
39+
len(efs_project_ids),
40+
)
3741

3842
projects_repo = ProjectsRepo(app.state.engine)
3943
for project_id in efs_project_ids:

services/efs-guardian/src/simcore_service_efs_guardian/services/background_tasks_setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
_logger = logging.getLogger(__name__)
1616

17-
_SEC = 1000 # in ms
18-
_MIN = 60 * _SEC # in ms
19-
_HOUR = 60 * _MIN # in ms
17+
_SEC = 1 # in s
18+
_MIN = 60 * _SEC # in s
19+
_HOUR = 60 * _MIN # in s
2020

2121

2222
class EfsGuardianBackgroundTask(TypedDict):

services/efs-guardian/src/simcore_service_efs_guardian/services/process_messages_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def _subscribe_to_rabbitmq(app) -> str:
3939
def _on_app_startup(app: FastAPI) -> Callable[[], Awaitable[None]]:
4040
async def _startup() -> None:
4141
with log_context(
42-
_logger, logging.INFO, msg="setup resource tracker"
42+
_logger, logging.INFO, msg="setup efs guardian process messages"
4343
), log_catch(_logger, reraise=False):
4444
app_settings: ApplicationSettings = app.state.settings
4545
app.state.efs_guardian_rabbitmq_consumer = None

0 commit comments

Comments
 (0)