Changeset - 4424d3a52585
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-10-10 16:55:56

Changed upload target to tmp, removed junk
1 file changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -163,13 +163,13 @@ if(gotframe ==1)
 
    */
 
    _distren_asprintf(&jobdatapath, "job%d", jobnum);
 
    _distren_asprintf(&urltoTar, "http://protofusion.org/distren/stor/job%d/job%d.tar.gz",jobnum); // Prepares URL to download from
 
    _distren_asprintf(&pathtoTar, "%s/stor/jobdata/job%d.tar.gz", datadir, jobnum); // Prepares destination to save to
 

	
 
    _distren_asprintf(&pathtoJobfile, "%s/%s/job.blend", datadir, jobdatapath ); // Prepares the path to the jobfile
 
    _distren_asprintf(&urltoOutput, "http://protofusion.org/distren/stor/job%d/output/", jobdatapath ); // Prepares the URL where output is posted
 
    _distren_asprintf(&urltoOutput, "http://protofusion.org/distren/stor/tmp/", jobdatapath ); // Prepares the URL where output is posted
 
    _distren_asprintf(&pathtoXml, "%s/job%d/job%d.xml",datadir, jobnum ); // Prepares the path to the job's XML file
 

	
 
      // Downloads the job tar if it isn't  present. @TODO: Delete old job data
 
      struct stat buffer;
 
      int fstatus = stat(pathtoJobfile, &buffer);
 

	
 
@@ -204,13 +204,13 @@ if(gotframe ==1)
 
      fprintf(stderr,"I think the XML craziness may have failed, so I'll terminate just for fun.\n");
 
      return 1;
 
    }
 

	
 
    /* Variable-fillers which require XML */
 
    outputExt = myjob->output_format; /* @TODO: FIXME! */
 
    _distren_asprintf(&pathtoOutput, "%s/job%d/output/frame%d.%s", datadir, jobnum, framenum, outputExt ); // Prepares the path to the jobfile
 
    _distren_asprintf(&pathtoOutput, "%s/job%d/output/job%d-frame%d.%s", datadir, jobnum, jobnum, framenum, outputExt ); // Prepares the path to the jobfile
 

	
 

	
 
    /** Series of IF's for jobtype based on xml content */
 
    if(1==1){
 
     exec_blender(myjob, pathtoJobfile, pathtoOutput, framenum, threads); // @TODO: This warning should be fixed :D
 
    }
 
@@ -224,14 +224,12 @@ if(gotframe ==1)
 
    busy = 2;
 
    // busy = 1; // @TODO: When done rendering, set this.
 
     }
 
    // When blender is finished, run this...
 
      if(busy==2){
 
        fprintf(stderr, "Finished frame %d in job %d, uploading...",framenum,jobnum);
 
        char *outputurl;
 
        _distren_asprintf(&outputurl, "http://protofusion.org/distren/stor/job%d/",jobnum); // Aggregates the output url
 
        curlpost(pathtoOutput, urltoOutput); // uploads (HTML POST) the output at outputpath to the server at outputurl
 
        tell_the_server(DISTREN_REQUEST_DONEFRAME); // Tells the server that it's finished rendering this frame
 
        busy=0;
 
        // Slave now becomes idle, doesn't need to tell the server anything, ssh handles this.
 
      }
 

	
0 comments (0 inline, 0 general)