
The add-on code was copy-pasted from other addons and used the GPL v2 license, whereas by accident the LICENSE text file had the GNU "Affero" GPL license v3 (instead of regular GPL v3). This is now all streamlined, and all code is licensed as "GPL v3 or later". Furthermore, the code comments just show a SPDX License Identifier instead of an entire license block.
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
/* Example job JSON:
|
|
|
|
{
|
|
"metadata": {
|
|
"project": "Sprite Fright",
|
|
"user.email": "sybren@blender.org",
|
|
"user.name": "Sybren Stüvel"
|
|
},
|
|
"type": "echo-sleep-test",
|
|
"name": "pošalji poruku i idi na spavanje",
|
|
"priority": 50,
|
|
"settings": {
|
|
"message": "prespavati",
|
|
"sleep_duration_seconds": 3
|
|
}
|
|
}
|
|
|
|
*/
|
|
|
|
const JOB_TYPE = {
|
|
label: "Echo Sleep Test",
|
|
settings: [
|
|
{ key: "message", type: "string", required: true },
|
|
{ key: "sleep_duration_seconds", type: "int32", default: 1 },
|
|
]
|
|
};
|
|
|
|
|
|
function compileJob(job) {
|
|
const settings = job.settings;
|
|
|
|
const echoTask = author.Task("echo", "misc");
|
|
echoTask.addCommand(author.Command("echo", {message: settings.message}));
|
|
|
|
const sleepTask = author.Task("sleep", "misc")
|
|
sleepTask.addCommand(author.Command("sleep", {duration_in_seconds: settings.sleep_duration_seconds}))
|
|
sleepTask.addDependency(echoTask); // Ensure sleeping happens after echo, and not at the same time.
|
|
|
|
job.addTask(echoTask);
|
|
job.addTask(sleepTask);
|
|
}
|