Changeset - c72229e67266
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-08-08 00:18:04

Formatting
1 file changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -169,22 +169,22 @@ void start_data(){
 
  else{
 
    general_info.total_finished_jobs = 0;
 
    general_info.total_frames_rendered = 0;
 
  }
 
}
 

	
 
// **** Finish-Setter: Sets a frame to the "completed" status.
 
/** 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 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
 
/** 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;
 
@@ -289,13 +289,13 @@ void status_report_generator(struct blen
 
    } /* while(blendjob_ptr) */
 

	
 
  general_info.jobs_in_queue = (highest_jobnum - general_info.total_finished_jobs); /*< extraneous parentheses! */
 
}
 

	
 

	
 
// **** Structure Builder: This function creates frame array based on the total number of frames to be rendered, which will then be parsed by function frame_farmer.
 
/** Structure Builder: This function creates frame array based on the total number of frames to be rendered, which will then be parsed by function frame_farmer. */
 
void frame_num_struct_builder(struct blendjob *job, unsigned int startframe, unsigned int numframes) {
 
  int jobnum_new = highest_jobnum + 1; /* global vars will someday leave us  */
 
  unsigned int counter;
 

	
 
  job->frameset = malloc(sizeof(struct frameset) * numframes);
 
  if(!job->frameset)
 
@@ -383,12 +383,13 @@ int frame_finder(struct blendjob *head, 
 
  *job = blendjob_ptr;
 
  *frame =  &blendjob_ptr->frameset[your_frame];
 

	
 
  return 0;
 
}
 

	
 
/** Checks for dying slaves */
 
void blend_frame_watchdog(struct blendjob *blendjob_head)
 
{
 
  unsigned short int watchdog_forgiveness; /*< seconds to wait on a frame before re-assigning it */
 
  struct blendjob *blendjob_ptr;
 
  unsigned int counter;
 

	
0 comments (0 inline, 0 general)