@@ -32,19 +32,16 @@ define([
3232 this . consoleOutputLen = { } ;
3333 }
3434
35- async createJob ( hash ) {
36- const filesInfo = await this . _uploadFiles ( hash ) ;
37- const job = await this . _createJob ( filesInfo ) ;
38- const jobInfo = {
39- id : job . id ,
40- hash,
41- } ;
35+ async startJob ( job ) {
36+ const filesInfo = await this . _uploadFiles ( job . hash ) ;
37+ const { id} = await this . _startJob ( job , filesInfo ) ;
38+ const jobInfo = { id, hash : job . hash } ;
4239 this . _poll ( jobInfo ) ;
4340
4441 return jobInfo ;
4542 }
4643
47- async _createConfig ( filesInfo ) {
44+ async _createConfig ( job , filesInfo ) {
4845 const { dirname, volumePool, volume} = filesInfo ;
4946 const domain = await this . _getComputeDomain ( ) ;
5047 const userVolumes = domain . userVolumes . map ( volume => ( {
@@ -58,7 +55,7 @@ define([
5855 dockerComputeEndpoint : domain . apiEndpoint ,
5956 dockerImageName : 'DeepForge' ,
6057 resultsFolderURI : '' ,
61- submitterDID : 'DeepForge Job' ,
58+ submitterDID : job . name ,
6259 volumeContainers : [ ] ,
6360 userVolumes : userVolumes
6461 } ;
@@ -89,8 +86,8 @@ define([
8986 return filesInfo ;
9087 }
9188
92- async _createJob ( filesInfo ) {
93- const config = await this . _createConfig ( filesInfo ) ;
89+ async _startJob ( job , filesInfo ) {
90+ const config = await this . _createConfig ( job , filesInfo ) ;
9491 const url = 'https://apps.sciserver.org/racm//jobm/rest/jobs/docker' ;
9592
9693 const opts = {
0 commit comments