Changeset - f993fd280c02
[Not reviewed]
default
0 2 0
ethanzonca@zserver2 - 16 years ago 2010-01-01 11:58:47

Minor slave updates
2 files changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -197,7 +197,7 @@ int main(int argc, char *argv[])
 
        mkdir("/tmp/distren", 0750); /* @FIXME: Change to tmpdir once it exists */
 
        mkdir(outdir, 0750);
 

	
 
        _distren_asprintf(&tarcmd, "tar -xvf \"%s\" -C \"%s\"", pathtoTar, outdir); /* @TODO:Use a lib here! */
 
        _distren_asprintf(&tarcmd, "tar -xvf \"%s\" -C \"%s\"", pathtoTar, outdir); /* @FIXME:Use a lib here! */
 
        system(tarcmd);
 
        free(tarcmd);
 
        free(pathtoTar);
 
@@ -220,6 +220,7 @@ int main(int argc, char *argv[])
 

	
 
        /* Variable-fillers which require XML */
 
        outputExt = myjob->output_format;
 

	
 
        /* Prepares the path to the jobfile */
 
        _distren_asprintf(&pathtoOutput, "%s/job%d/output/job%d-frame%d.%s", datadir, jobnum, jobnum, framenum, outputExt );
 
        free(outputExt);
 
@@ -249,15 +250,16 @@ int main(int argc, char *argv[])
 
                tries++;
 
                sleep(10);
 
              }
 
            // @TODO: Keep track of files that we were unable to upload, and upload them later
 
            // @FUTURE: Keep track of files that we were unable to upload, and upload them later
 
          }
 
        free(urltoOutput);
 
        free(pathtoOutput);
 

	
 
        // Tell the server that rendering and upload are complete
 
        // sendServer(DISTREN_REQUEST_DONEFRAME);
 
        sendSignal(comm_slave, DISTREN_REQUEST_DONEFRAME);
 

	
 
        // Tell the server that rendering and upload are complete of "jobjum.framenum"
 
	char *jobFrame;
 
	_distren_asprintf(&jobFrame, "%s.%s", jobnum, framenum);
 
        sendExtSignal(comm_slave, DISTREN_REQUEST_DONEFRAME, jobFrame);
 
	free(jobFrame);
 
      }
 
    else
 
      fprintf(stderr,"Nothing to do. Idling...\n");
src/server/slavefuncs.c
Show inline comments
 
@@ -213,7 +213,7 @@ int curlpost(char *filename, char *url){
 
/** Logs the user into the server after ensuring that keys exist */
 
int login_user(char *username)
 
{
 
  // @TODO: Put some telnet-style auth code here
 
  // @TODO: Put some telnet-style auth code here unless this is obselete
 
  return 1; // success
 
}
 

	
0 comments (0 inline, 0 general)