diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -82,6 +82,11 @@ int highest_jobnum; // The job number of /* ********************** Functions ************************* */ +/** Dumps all data in RAM to an xml file (such as current jobs, etc) which is parsed by start_data. Remember to invoke this before shutting down! */ +int xml_dump() +{ + return 0; +} /** Performs command stored in a client's request. */ @@ -129,7 +134,9 @@ void remotio_send_to_client() int start_data(){ struct stat buffer; if(stat(SYSCONFDIR "/data.xml", &buffer) == 0){ - // retrieve total_finished_jobs and total_finished_frames from xml file + + // @TODO: retrieve total_finished_jobs and total_finished_frames from xml file + fprintf(stderr,"Parsing XML files and restoring previous state...\n"); return 1; } @@ -271,7 +278,7 @@ void frame_num_struct_builder(struct dis job->frameset = malloc(sizeof(struct frameset) * numframes); if(!job->frameset) - fprintf(stderr, "error allocating memory"); + fprintf(stderr, "Error allocating memory\n"); job->total_frames = numframes; // sets the total number of frames in animation for status purposes job->jobnum = jobnum_new; @@ -322,7 +329,7 @@ int frame_finder(struct distrenjob *head if(!found) { - fprintf(stderr, "out of jobs to render\n"); + fprintf(stderr, "No more jobs to render\n"); return 1; } @@ -343,10 +350,11 @@ int frame_finder(struct distrenjob *head /* should the job be removed now? */ fprintf(stderr, "Job %d is finished, this is probably the place to call the job-removal function\n", distrenjob_ptr->jobnum); + /* @TODO: At this point, all slaves should be instructed to delete the source data for this job. */ } } - /* sets the value of the frame to 1, which means its taken !!!!!! MISSSING APOSTROPHE!!!!!!! */ + /* Sets the value of the frame to 1, which means it is taken */ distrenjob_ptr->frameset[your_frame].status++; distrenjob_ptr->frameset[your_frame].start_time = clock(); @@ -364,7 +372,7 @@ void blend_frame_watchdog(struct distren struct distrenjob *distrenjob_ptr; unsigned int counter; - watchdog_forgiveness = 3; /*< hours of forgiveness before frame is re-assigned @TODO: Make this more user-configurable (maybe per-job), 3 hours is a LONG time */ + watchdog_forgiveness = 1; /*< hours of forgiveness before frame is re-assigned @TODO: Make this more user-configurable (maybe per-job), 3 hours is a LONG time */ distrenjob_ptr = distrenjob_head; for(distrenjob_ptr = distrenjob_head; distrenjob_ptr; distrenjob_ptr = distrenjob_ptr->next)