Changeset - 52bf06710be2
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-07-06 18:06:45

Moved a bit of stuff around
1 file changed with 16 insertions and 13 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -31,17 +31,25 @@
 
#include "execio.h"
 
#include "options.h"
 
#include <confuse.h>
 

	
 
#define max 100 // maximum number of stored jobs in memory, per job type (lux/blend). Eventually we can dump this data to disk, or atleast the remainder not in memory...
 

	
 
int jobnum = 0;
 

	
 
int jobnum = 0; // The next job number to create in the queue
 
int hcfjob; // Highest consecutively finished job
 
int highest_jobnum; // The job number of the most recently created job, this is used when creating new jobs
 

	
 
int highest_jobnum; // The job number of the most recently created job, this is used when creating new jobs
 

	
 

	
 
struct distrend_config
 
{
 
  cfg_t *mycfg;
 
  struct options_common *options;
 
  struct distrend_listen **listens; /*< Null terminated array of structs */
 
}
 

	
 

	
 
// Structures for storing job information
 
struct {
 
  char *name;
 
  char *submitter;
 
  char *email;
 
@@ -71,13 +79,13 @@ struct {
 
// -- end of Matthew's handywork --
 
*/
 

	
 
int main(int argc, char *argv[])
 
{
 

	
 
// I'm assuming this is a non-working framework :)
 
// Begin non-working framework?
 
	int distrend_do_config(int argc, char *argv[], struct distrend_config *config)
 
	{
 
	  cfg_opt_t myopts =
 
	    {
 
	      CFG_SEC("listen",  /* this must be imported into struct listens (which must still be declared) */
 
	    {
 
@@ -98,13 +106,13 @@ int main(int argc, char *argv[])
 
	{
 
	  options_free(config->options);
 
	  free(config);
 

	
 
	  return 0;
 
	}
 

	
 
// End non-working framework?
 

	
 

	
 

	
 
  int cont = 1;
 
  struct distrend_listenset *listenset;
 
  struct distrend_config *config;
 
@@ -123,21 +131,14 @@ int main(int argc, char *argv[])
 

	
 
  distrend_unlisten(listenset);
 
  distrend_config_free(config);
 

	
 
  return 0;
 
}
 
// End main. Please take this into account when putting in code!!! Use the bracket highlighter!!!
 

	
 
struct distrend_config
 
{
 
  cfg_t *mycfg;
 
  struct options_common *options;
 

	
 
  struct distrend_listen **listens; /*< Null terminated array of structs */
 

	
 
}
 

	
 

	
 

	
 

	
 

	
 

	
 
@@ -156,12 +157,14 @@ struct distrend_config
 

	
 
 Have a script crawl through each job in the arrays, priority-biased, and assign a frame to each slave.
 
 Then we will need some sort of watchdog to monitor slaves on the main server to check for stales. Maybe not worry about this for now.
 
*/
 

	
 

	
 

	
 

	
 
/* -- Coding using OLD FRAMESET STRUCTURE... temporarily saving it!! -- :: Normaldotcom glances at lordofwar with a concerned look...
 
// 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(int sframe, int eframe) {
 
	int jobnum_new = highest_jobnum + 1;
 
	int total = (sframe - eframe) +1;  // total number of frames
 
	int fcount = sframe; // Used to create all the frames in the structure from sframe to eframe
0 comments (0 inline, 0 general)