fix: default value
This commit is contained in:
		
							parent
							
								
									45e203cf60
								
							
						
					
					
						commit
						184142536b
					
				|  | @ -8,8 +8,7 @@ class CmdFile(BaseModel): | ||||||
|     content: Optional[str] = None |     content: Optional[str] = None | ||||||
|     file_id: Optional[str] = Field(None, serialization_alias="fileId") |     file_id: Optional[str] = Field(None, serialization_alias="fileId") | ||||||
|     name: Optional[str] = None |     name: Optional[str] = None | ||||||
|     max: Optional[int] = 4 * 1024 * 1024 |     max: Optional[int] = 40 * 1024 * 1024 | ||||||
|     max: Optional[int] = 4 * 1024 * 1024 |  | ||||||
|     symlink: Optional[str] = None |     symlink: Optional[str] = None | ||||||
|     stream_in: bool = Field(False, serialization_alias="streamIn") |     stream_in: bool = Field(False, serialization_alias="streamIn") | ||||||
|     stream_out: bool = Field(False, serialization_alias="streamOut") |     stream_out: bool = Field(False, serialization_alias="streamOut") | ||||||
|  | @ -22,17 +21,10 @@ class Cmd(BaseModel): | ||||||
|     stdin: Optional[CmdFile] = CmdFile(content="") |     stdin: Optional[CmdFile] = CmdFile(content="") | ||||||
|     stdout: Optional[CmdFile] = CmdFile(name="stdout", max=4 * 1024) |     stdout: Optional[CmdFile] = CmdFile(name="stdout", max=4 * 1024) | ||||||
|     stderr: Optional[CmdFile] = CmdFile(name="stderr", max=4 * 1024) |     stderr: Optional[CmdFile] = CmdFile(name="stderr", max=4 * 1024) | ||||||
|     cpu_limit: int = Field(4 * 1000000000, serialization_alias="cpuLimit") |     cpu_limit: int = Field(4 * 1000000000000, serialization_alias="cpuLimit") | ||||||
|     env: list[str] = ["PATH=/usr/bin:/bin:/usr/local/bin"] |  | ||||||
|     stdin: Optional[CmdFile] = CmdFile(content="") |  | ||||||
|     stdout: Optional[CmdFile] = CmdFile(name="stdout", max=4 * 1024) |  | ||||||
|     stderr: Optional[CmdFile] = CmdFile(name="stderr", max=4 * 1024) |  | ||||||
|     cpu_limit: int = Field(4 * 1000000000, serialization_alias="cpuLimit") |  | ||||||
|     real_cpu_limit: int = Field(0, serialization_alias="realCpuLimit") |     real_cpu_limit: int = Field(0, serialization_alias="realCpuLimit") | ||||||
|     clock_limit: int = Field(8 * 1000000000, serialization_alias="clockLimit") |     clock_limit: int = Field(8 * 1000000000000, serialization_alias="clockLimit") | ||||||
|     memory_limit: int = Field(4 * 1024 * 1024, serialization_alias="memoryLimit") |     memory_limit: int = Field(80 * 1024 * 1024, serialization_alias="memoryLimit") | ||||||
|     clock_limit: int = Field(8 * 1000000000, serialization_alias="clockLimit") |  | ||||||
|     memory_limit: int = Field(4 * 1024 * 1024, serialization_alias="memoryLimit") |  | ||||||
|     stack_limit: int = Field(0, serialization_alias="stackLimit") |     stack_limit: int = Field(0, serialization_alias="stackLimit") | ||||||
|     proc_limit: int = Field(50, serialization_alias="procLimit") |     proc_limit: int = Field(50, serialization_alias="procLimit") | ||||||
|     proc_limit: int = Field(50, serialization_alias="procLimit") |     proc_limit: int = Field(50, serialization_alias="procLimit") | ||||||
|  | @ -58,16 +50,11 @@ class OptionalCmd(BaseModel): | ||||||
|     stdin: Optional[CmdFile] = None |     stdin: Optional[CmdFile] = None | ||||||
|     stdout: Optional[CmdFile] = None |     stdout: Optional[CmdFile] = None | ||||||
|     stderr: Optional[CmdFile] = None |     stderr: Optional[CmdFile] = None | ||||||
|     cpu_limit: Optional[int] = Field(4 * 1000000000, serialization_alias="cpuLimit") |     cpu_limit: Optional[int] = Field(4 * 1000000000000, serialization_alias="cpuLimit") | ||||||
|     cpu_limit: Optional[int] = Field(4 * 1000000000, serialization_alias="cpuLimit") |  | ||||||
|     real_cpu_limit: Optional[int] = Field(None, serialization_alias="realCpuLimit") |     real_cpu_limit: Optional[int] = Field(None, serialization_alias="realCpuLimit") | ||||||
|     clock_limit: Optional[int] = Field(8 * 1000000000, serialization_alias="clockLimit") |     clock_limit: Optional[int] = Field(8 * 1000000000000, serialization_alias="clockLimit") | ||||||
|     memory_limit: Optional[int] = Field( |     memory_limit: Optional[int] = Field( | ||||||
|         4 * 1024 * 1024, serialization_alias="memoryLimit" |         80 * 1024 * 1024, serialization_alias="memoryLimit" | ||||||
|     ) |  | ||||||
|     clock_limit: Optional[int] = Field(8 * 1000000000, serialization_alias="clockLimit") |  | ||||||
|     memory_limit: Optional[int] = Field( |  | ||||||
|         4 * 1024 * 1024, serialization_alias="memoryLimit" |  | ||||||
|     ) |     ) | ||||||
|     stack_limit: Optional[int] = Field(None, serialization_alias="stackLimit") |     stack_limit: Optional[int] = Field(None, serialization_alias="stackLimit") | ||||||
|     proc_limit: Optional[int] = Field(50, serialization_alias="procLimit") |     proc_limit: Optional[int] = Field(50, serialization_alias="procLimit") | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -46,10 +46,10 @@ | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|                             }, |                             }, | ||||||
|                             "cpuLimit": 4000000000, |                             "cpuLimit": 4000000000000, | ||||||
|                             "realCpuLimit": 0, |                             "realCpuLimit": 0, | ||||||
|                             "clockLimit": 8000000000, |                             "clockLimit": 8000000000000, | ||||||
|                             "memoryLimit": 4194304, |                             "memoryLimit": 83886080, | ||||||
|                             "stackLimit": 0, |                             "stackLimit": 0, | ||||||
|                             "procLimit": 50, |                             "procLimit": 50, | ||||||
|                             "cpuRateLimit": 0, |                             "cpuRateLimit": 0, | ||||||
|  | @ -57,7 +57,7 @@ | ||||||
|                             "copyIn": { |                             "copyIn": { | ||||||
|                                 "./repo-health-checker": { |                                 "./repo-health-checker": { | ||||||
|                                     "src": "/usr/local/bin/repo-health-checker", |                                     "src": "/usr/local/bin/repo-health-checker", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -101,7 +101,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -131,7 +131,7 @@ | ||||||
|                             "copyIn": { |                             "copyIn": { | ||||||
|                                 "tools/compile": { |                                 "tools/compile": { | ||||||
|                                     "src": "/home/tt/.config/joj/tools/compile", |                                     "src": "/home/tt/.config/joj/tools/compile", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -209,7 +209,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -239,7 +239,7 @@ | ||||||
|                             "copyIn": { |                             "copyIn": { | ||||||
|                                 "tools/filelength": { |                                 "tools/filelength": { | ||||||
|                                     "src": "/home/tt/.config/joj/tools/filelength", |                                     "src": "/home/tt/.config/joj/tools/filelength", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -323,7 +323,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -353,7 +353,7 @@ | ||||||
|                             "copyIn": { |                             "copyIn": { | ||||||
|                                 "projects/p2/.clang-tidy": { |                                 "projects/p2/.clang-tidy": { | ||||||
|                                     "src": "/home/tt/.config/joj/projects/p2/.clang-tidy", |                                     "src": "/home/tt/.config/joj/projects/p2/.clang-tidy", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -464,7 +464,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -571,7 +571,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -680,7 +680,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -761,7 +761,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -842,7 +842,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -922,7 +922,7 @@ | ||||||
|                             ], |                             ], | ||||||
|                             "stdin": { |                             "stdin": { | ||||||
|                                 "content": "", |                                 "content": "", | ||||||
|                                 "max": 4194304, |                                 "max": 41943040, | ||||||
|                                 "streamIn": false, |                                 "streamIn": false, | ||||||
|                                 "streamOut": false, |                                 "streamOut": false, | ||||||
|                                 "pipe": false |                                 "pipe": false | ||||||
|  | @ -952,35 +952,35 @@ | ||||||
|                             "copyIn": { |                             "copyIn": { | ||||||
|                                 "h6/build/ex2": { |                                 "h6/build/ex2": { | ||||||
|                                     "src": "/home/tt/.config/joj/h6/build/ex2", |                                     "src": "/home/tt/.config/joj/h6/build/ex2", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|                                 }, |                                 }, | ||||||
|                                 "h6/build/ex4": { |                                 "h6/build/ex4": { | ||||||
|                                     "src": "/home/tt/.config/joj/h6/build/ex4", |                                     "src": "/home/tt/.config/joj/h6/build/ex4", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|                                 }, |                                 }, | ||||||
|                                 "h6/build/ex5": { |                                 "h6/build/ex5": { | ||||||
|                                     "src": "/home/tt/.config/joj/h6/build/ex5", |                                     "src": "/home/tt/.config/joj/h6/build/ex5", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|                                 }, |                                 }, | ||||||
|                                 "h6/build/ex6": { |                                 "h6/build/ex6": { | ||||||
|                                     "src": "/home/tt/.config/joj/h6/build/ex6", |                                     "src": "/home/tt/.config/joj/h6/build/ex6", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|                                 }, |                                 }, | ||||||
|                                 "h6/build/ex7": { |                                 "h6/build/ex7": { | ||||||
|                                     "src": "/home/tt/.config/joj/h6/build/ex7", |                                     "src": "/home/tt/.config/joj/h6/build/ex7", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1010,7 +1010,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case0.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case0.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1026,7 +1026,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case1.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case1.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1042,7 +1042,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case2.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case2.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1058,7 +1058,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case3.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case3.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1074,7 +1074,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case4.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case4.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1090,7 +1090,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case5.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case5.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1106,7 +1106,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case6.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case6.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1122,7 +1122,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case7.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case7.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1138,7 +1138,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case8.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case8.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  | @ -1154,7 +1154,7 @@ | ||||||
|                                 ], |                                 ], | ||||||
|                                 "stdin": { |                                 "stdin": { | ||||||
|                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case9.in", |                                     "src": "/home/tt/.config/joj/tests/homework/h6/e3/case9.in", | ||||||
|                                     "max": 4194304, |                                     "max": 41943040, | ||||||
|                                     "streamIn": false, |                                     "streamIn": false, | ||||||
|                                     "streamOut": false, |                                     "streamOut": false, | ||||||
|                                     "pipe": false |                                     "pipe": false | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user