Changeset - 80c9092dbaa9
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-25 21:32:07

Cosmetics, minor stuff
1 file changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -147,25 +147,25 @@ void start_data(){
 
	if(1 == 0){
 
		// retrieve total_finished_jobs and total_finished_frames from xml file
 
	}
 
	else{
 
		general_info.total_finished_jobs = 0;
 
		general_info.total_frames_rendered = 0;
 
	}
 
}
 

	
 
// **** Finish-Setter: Sets a frame to the "completed" status.
 
void finish_frame(struct blendjob *blendjob, int frame){
 
  blendjob->frameset[frame].status = 2;
 
  blendjob->frameset[frame].time_to_render = (clock() - blendjob[jobnum].frameset[frame].start_time); // Consider changin time-to-render to time-for-frame or something?
 
  blendjob->frameset[frame].time_to_render = (clock() - blendjob[jobnum].frameset[frame].start_time); // Consider changing time-to-render to time-for-frame or something?
 

	
 
  general_info.total_frames_rendered++; // Increase total frames var for stats
 
}
 

	
 

	
 
// **** Queuer: Adds files to the queue
 
void queue(struct blendjob *blendjob, int type, char *name, char *submitter, char *email, int priority, int mode, int spp, struct frameset *frameset) {
 
	// Type: 1 = blender, add more types later
 
	// jobnum is the next available job number
 
	if(type == 1){
 
    blendjob->name = name;
 
    blendjob->submitter = submitter;
 
@@ -497,30 +497,30 @@ int main(int argc, char *argv[])
 
      struct distren_action *action;
 

	
 
      distrend_accept(&action);
 
      cont = distrend_do(action);
 

	
 

	
 
      /* Somewhat Pseudo-code for basic server operation, should be more event-driven */
 

	
 
      start_data();
 
      status_report_generator(); // TODO: Add correct args
 
      blend_frame_watchdog();	 // TODO: Add correct args
 

	
 
// TODO: Okay, so the slave really needs 3 statuses, not just "idle" and "working" so the server can tell when it finishes a frame
 
int iteration; // We shouldn't need this.
 
int framenum;
 
int jobnum;
 
      /* If the client is idle */
 
      	if(clientstatus == DISTREN_REQUEST_DONEFRAME && iteration > 0){
 

	
 
      int framenum;
 
      int jobnum;
 

	
 
      /* If the client is idle (meaning a client without the "busy" status connected via ssh) */
 
      	if(clientstatus == idle && iteration > 0){
 
      		framenum = frame_finder(); // give framefinder args, framefinder should return job number and frame number
 
      		jobnum = frame_finder();
 
      		remotio_send_to_client(framenum);
 
      	}
 
      /* If the client's status changes from running to idle */
 
      	if(clientstatus == DISTREN_REQUEST_DONEFRAME && iteration == 0){
 
      		finish_frame(jobnum, framenumprevious); // make it finish the previous frame or something.
 
      		frame_finder() ==> returns jobnum/framenum that are sent to slave, "render jobnum framenum"
 
      	}
 

	
 
      /* End Somewhat Pseudo-code */
 

	
0 comments (0 inline, 0 general)