7 #ifndef WORK_QUEUE_CATALOG_H
8 #define WORK_QUEUE_CATALOG_H
14 #include "catalog_server.h"
20 #include "hash_cache.h"
24 #include "stringtools.h"
35 #include <sys/types.h>
38 #define WORK_QUEUE_CATALOG_UPDATE_INTERVAL 60
39 #define WORK_QUEUE_CATALOG_LIFETIME 300
41 #define WORK_QUEUE_NAME_MAX 256
42 #define WORK_QUEUE_PROTOCOL_BLANK_FIELD "-"
43 #define WORK_QUEUE_PROTOCOL_FIELD_MAX 256
48 char proj[WORK_QUEUE_NAME_MAX];
55 int total_tasks_dispatched;
60 char *workers_by_pool;
62 int default_max_workers_from_pool;
64 int workers_from_this_pool;
65 int target_workers_from_pool;
80 void debug_print_masters(
struct list *ml);
82 int parse_catalog_server_description(
char *server_string,
char **host,
int *port);
84 struct work_queue_pool *parse_work_queue_pool_nvpair(
struct nvpair *nv);
88 int workers_by_item(
const char *workers_by_item,
const char *item_name);
96 void free_work_queue_master_list(
struct list *ml);
98 struct list *get_masters_from_catalog(
const char *catalog_host,
int catalog_port,
struct list *regex_list);
100 int advertise_master_to_catalog(
const char *catalog_host,
int catalog_port,
const char *project_name,
struct work_queue_stats *s,
const char *workers_summary,
int now);
102 int get_pool_decisions_from_catalog(
const char *catalog_host,
int catalog_port,
const char *proj,
struct list *decisions);
104 int advertise_pool_decision_to_catalog(
const char *catalog_host,
int catalog_port,
const char *pool_name,
const char *decision);