linux-worker: automatically set job pwd if it is not specified in job description

This commit is contained in:
lxsang 2021-12-06 12:23:05 +01:00
parent dd3aae50c9
commit 98335a2a51
8 changed files with 13 additions and 3 deletions

View File

@ -2,6 +2,7 @@
AntOSDK: development API for AntOS based applications/projects
## Change logs
- 0.0.13: allow linux-job handle to set defaut pwd if it is not specified in job description
- 0.0.12: TS worker now allows user specific compile options (defined un build file)
- 0.0.11: Update AntOS API v1.2.1
- 0.0.10: fix binary readfile bug

View File

@ -2,6 +2,7 @@
AntOSDK: development API for AntOS based applications/projects
## Change logs
- 0.0.13: allow linux-job handle to set defaut pwd if it is not specified in job description
- 0.0.12: TS worker now allows user specific compile options (defined un build file)
- 0.0.11: Update AntOS API v1.2.1
- 0.0.10: fix binary readfile bug

View File

@ -37,6 +37,10 @@ class LinuxJob extends AntOSDKBaseJob {
this.result("Done");
};
socket.onopen = (e) => {
if(!this.job.data.pwd)
{
this.job.data.pwd = this.job.root;
}
// send the command
const cmd = {
path: path,

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "mrsang@iohub.dev"
},
"version": "0.0.12-a",
"version": "0.0.13-a",
"category": "Development",
"iconclass": "fa fa-cog",
"mimes": [

View File

@ -37,6 +37,10 @@ class LinuxJob extends AntOSDKBaseJob {
this.result("Done");
};
socket.onopen = (e) => {
if(!this.job.data.pwd)
{
this.job.data.pwd = this.job.root;
}
// send the command
const cmd = {
path: path,

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "mrsang@iohub.dev"
},
"version": "0.0.12-a",
"version": "0.0.13-a",
"category": "Development",
"iconclass": "fa fa-cog",
"mimes": [

View File

@ -205,7 +205,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/libantosdk/README.md",
"category": "Development",
"author": "Xuan Sang LE",
"version": "0.0.12-a",
"version": "0.0.13-a",
"dependencies": [],
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/libantosdk/build/release/libantosdk.zip"
},