Refactor job model and optimize job streaming.
Updated the `JobModel` with foreign key relationships and string-based status to enhance database consistency, and improved job event streaming by using `jsonable_encoder` for better serialization. Also, streamlined dependencies by adding `urllib3` to handle HTTP requests.
This commit is contained in:
@ -941,3 +941,19 @@ class ResultResponse(BaseModel):
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class JobsCreate(BaseModel):
|
||||
id: str
|
||||
name: str
|
||||
status: str
|
||||
type: str
|
||||
start_time: datetime
|
||||
end_time: datetime
|
||||
description: Optional[str]
|
||||
parameters: str
|
||||
datacollectionparameters: DataCollectionParameters
|
||||
beamlineparameters: BeamlineParameters
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
Reference in New Issue
Block a user