From 54e3a156c17ddf4a9ba0c4b928c1887506b51d0e Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Tue, 9 Jul 2019 00:03:49 +0300 Subject: [PATCH] Add external configuration defaults --- server/config/default/services/tasks.conf | 7 +++ server/schema/services/auth.conf | 20 ++++++++ server/schema/services/tasks.conf | 62 ++++++++++++++++++++++- 3 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 server/config/default/services/tasks.conf diff --git a/server/config/default/services/tasks.conf b/server/config/default/services/tasks.conf new file mode 100644 index 0000000..9d25c1d --- /dev/null +++ b/server/config/default/services/tasks.conf @@ -0,0 +1,7 @@ +non_responsive_tasks_watchdog { + # In-progress tasks older than this value in seconds will be stopped by the watchdog + threshold_sec: 7200 + + # Watchdog will sleep for this number of seconds after each cycle + watch_interval_sec: 900 +} diff --git a/server/schema/services/auth.conf b/server/schema/services/auth.conf index 9c9b9de..45f160b 100644 --- a/server/schema/services/auth.conf +++ b/server/schema/services/auth.conf @@ -317,4 +317,24 @@ edit_user { } } } +} + +fixed_users_mode { + authorize: false + "2.1" { + description: """ Return fixed users mode status""" + request { + type: object + additionalProperties: false + } + response { + type: object + properties { + enabled { + description: "Fixed users mode enabled" + type: boolean + } + } + } + } } \ No newline at end of file diff --git a/server/schema/services/tasks.conf b/server/schema/services/tasks.conf index 740c0aa..586eed6 100644 --- a/server/schema/services/tasks.conf +++ b/server/schema/services/tasks.conf @@ -69,13 +69,17 @@ _definitions { type: string } working_dir { - description: "Path to the folder from which to run the script Default - root folder of repository[f]" + description: "Path to the folder from which to run the script Default - root folder of repository" type: string } requirements { description: "A JSON object containing requirements strings by key" type: object } + diff { + description: "Uncommitted changes found in the repository when task was run" + type: string + } } } output { @@ -137,7 +141,7 @@ _definitions { description: """Json object representing the ids of the labels in the model. The keys are the layers' names and the values are the IDs. Not applicable for Register (Import) tasks. - Mandatory for Training tasks[z]""" + Mandatory for Training tasks""" type: object additionalProperties: { type: integer } } @@ -157,6 +161,7 @@ _definitions { publishing closed failed + completed unknown ] } @@ -1009,6 +1014,7 @@ publish { } } } + set_requirements { "2.1" { description: """Set the script requirements for a task""" @@ -1046,3 +1052,55 @@ set_requirements { } } } + +completed { + "2.2" { + description: "Signal a task has completed" + request = { + type: object + required: [ + task + ] + properties.force = ${_references.force_arg} { + description: "If not true, call fails if the task status is not created/in_progress/published" + } + } ${_references.status_change_request} + response { + type: object + properties { + updated { + description: "Number of tasks updated (0 or 1)" + type: integer + enum: [ 0, 1 ] + } + fields { + description: "Updated fields names and values" + type: object + additionalProperties: true + } + } + } + } +} + +ping { + "2.1" { + description: """ Refresh the task's last update time""" + request { + type: object + required: [ + task + ] + properties { + task { + description: "Task ID" + type: string + } + } + } + response { + type: object + additionalProperties: false + } + } +} \ No newline at end of file