project map script | semantic parcer
This commit is contained in:
@@ -24,7 +24,7 @@ router = APIRouter()
|
||||
class ScheduleSchema(BaseModel):
|
||||
enabled: bool = False
|
||||
cron_expression: str = Field(..., pattern=r'^(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|((((\d+,)*\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})$')
|
||||
# [/DEF:ScheduleSchema]
|
||||
# [/DEF:ScheduleSchema:DataClass]
|
||||
|
||||
# [DEF:EnvironmentResponse:DataClass]
|
||||
class EnvironmentResponse(BaseModel):
|
||||
@@ -32,14 +32,14 @@ class EnvironmentResponse(BaseModel):
|
||||
name: str
|
||||
url: str
|
||||
backup_schedule: Optional[ScheduleSchema] = None
|
||||
# [/DEF:EnvironmentResponse]
|
||||
# [/DEF:EnvironmentResponse:DataClass]
|
||||
|
||||
# [DEF:DatabaseResponse:DataClass]
|
||||
class DatabaseResponse(BaseModel):
|
||||
uuid: str
|
||||
database_name: str
|
||||
engine: Optional[str]
|
||||
# [/DEF:DatabaseResponse]
|
||||
# [/DEF:DatabaseResponse:DataClass]
|
||||
|
||||
# [DEF:get_environments:Function]
|
||||
# @PURPOSE: List all configured environments.
|
||||
@@ -61,7 +61,7 @@ async def get_environments(config_manager=Depends(get_config_manager)):
|
||||
) if e.backup_schedule else None
|
||||
) for e in envs
|
||||
]
|
||||
# [/DEF:get_environments]
|
||||
# [/DEF:get_environments:Function]
|
||||
|
||||
# [DEF:update_environment_schedule:Function]
|
||||
# @PURPOSE: Update backup schedule for an environment.
|
||||
@@ -89,7 +89,7 @@ async def update_environment_schedule(
|
||||
scheduler_service.load_schedules()
|
||||
|
||||
return {"message": "Schedule updated successfully"}
|
||||
# [/DEF:update_environment_schedule]
|
||||
# [/DEF:update_environment_schedule:Function]
|
||||
|
||||
# [DEF:get_environment_databases:Function]
|
||||
# @PURPOSE: Fetch the list of databases from a specific environment.
|
||||
@@ -119,6 +119,6 @@ async def get_environment_databases(id: str, config_manager=Depends(get_config_m
|
||||
return client.get_databases_summary()
|
||||
except Exception as e:
|
||||
raise HTTPException(status_code=500, detail=f"Failed to fetch databases: {str(e)}")
|
||||
# [/DEF:get_environment_databases]
|
||||
# [/DEF:get_environment_databases:Function]
|
||||
|
||||
# [/DEF:backend.src.api.routes.environments]
|
||||
# [/DEF:backend.src.api.routes.environments:Module]
|
||||
|
||||
Reference in New Issue
Block a user