Updated Assignments overview (markdown)

master
Petr Stefan 8 years ago
parent 7f79873472
commit 5ad5ca8d4e

@ -18,7 +18,7 @@ Each task has a unique ID (alphanum string like _CompileA_, _RunAA_, or _JudgeAB
### Task ### Task
Task is an atomic piece of work executed by recodex-worker. There are two basic types of tasks: Task is an atomic piece of work executed by recodex-worker. There are two basic types of tasks:
- **Execute external process** (optionally inside Isolate). Linux default will be mandatory in Isolate, this option is here because of Windows. - **Execute external process** (optionally inside Isolate). Linux default is mandatory usage of isolate, this option is here because of Windows, where is currently no sandbox available.
- **Perform internal operation**. External processes are meant for compilation, testing, or execution of external judges. Internal operations comprise commands, which are typically related to file/directory maintenance and other evaluation management stuff. Few important examples: - **Perform internal operation**. External processes are meant for compilation, testing, or execution of external judges. Internal operations comprise commands, which are typically related to file/directory maintenance and other evaluation management stuff. Few important examples:
- Create/delete/move/rename file/directory - Create/delete/move/rename file/directory
- (un)zip/tar/gzip/bzip file(s) - (un)zip/tar/gzip/bzip file(s)
@ -27,13 +27,13 @@ Task is an atomic piece of work executed by recodex-worker. There are two basic
Even though the internal operations may be handled by external executables (`mv`, `tar`, `pkzip`, `wget`, ...), it might be better to keep them inside the recodex-worker as it would simplify these operations and their portability among platforms. Furthermore, it is quite easy to implement them using common libraries (e.g., _zlib_, _curl_). Even though the internal operations may be handled by external executables (`mv`, `tar`, `pkzip`, `wget`, ...), it might be better to keep them inside the recodex-worker as it would simplify these operations and their portability among platforms. Furthermore, it is quite easy to implement them using common libraries (e.g., _zlib_, _curl_).
**External Tasks** **External Tasks**
These tasks are typically executed in isolate (with given parameters) and the recodex-worker waits until they finish. The exit code determines, whether the task succeeded (0) or failed (anything else). A task may be marked as essential; in such case, failure will immediately cause termination of the whole job. These tasks are typically executed in isolate (with given parameters) and the `recodex-worker` waits until they finish. The exit code determines, whether the task succeeded (0) or failed (anything else). A task may be marked as essential; in such case, failure will immediately cause termination of the whole job.
- **stdin** - can be configured to read from existing file or from /dev/null. - **stdin** - can be configured to read from existing file or from `/dev/null`.
- **stdout** and **stderr** - can be individually redirected to a file or discarded. If this output options are specified, than it is possible to upload output files with results by copying them in result directory. - **stdout** and **stderr** - can be individually redirected to a file or discarded. If this output options are specified, than it is possible to upload output files with results by copying them in result directory.
- **limits** - task have time and memory limits; if these limits are exceeded, the task also fails. - **limits** - task have time and memory limits; if these limits are exceeded, the task also fails.
The task results (exit code, time, and memory consumption, etc.) are saved into result yaml file and eventually sent back to frontend application to address which was specified on input. The task results (exit code, time, and memory consumption, etc.) are saved into result yaml file and sent back to frontend application to address which was specified on input.
### Directories and Files ### Directories and Files
For each job execution unique directory structure is created. Job is not restricted to specified directories (tasks can do whatever is allowed on system), but it is advised to use them inside job. In recodex-worker configuration one can specify worker default directory, this is base of every file which is produced by recodex-worker. For each job execution unique directory structure is created. Job is not restricted to specified directories (tasks can do whatever is allowed on system), but it is advised to use them inside job. In recodex-worker configuration one can specify worker default directory, this is base of every file which is produced by recodex-worker.
@ -65,7 +65,7 @@ Mandatory items are bold, optional italic.
- **fatal-failure** - if true, than execution of whole job will be stopped after failing of this one - **fatal-failure** - if true, than execution of whole job will be stopped after failing of this one
- **dependencies** - list of dependencies which have to be fulfilled before this task, can be omitted if there is no dependencies - **dependencies** - list of dependencies which have to be fulfilled before this task, can be omitted if there is no dependencies
- **cmd** - description of command which will be executed - **cmd** - description of command which will be executed
- **bin** - the binary itself - **bin** - the binary itself (full path of external command or name of internal task)
- _args_ - list of arguments which will be sent into execution unit - _args_ - list of arguments which will be sent into execution unit
- _test-id_ - ID of the test this task is part of - must be specified for tasks which the particular test's result depends on - _test-id_ - ID of the test this task is part of - must be specified for tasks which the particular test's result depends on
- _type_ - type of the task (used only in combination with _test-id_) - possible values are: **execution**, **evaluation** - _type_ - type of the task (used only in combination with _test-id_) - possible values are: **execution**, **evaluation**

Loading…
Cancel
Save