scheduling job with fake resource
This commit is contained in:
parent
5560ae91da
commit
088afe4ea0
12 changed files with 281 additions and 46 deletions
|
|
@ -12,9 +12,12 @@ typedef void* plugin_data_t;
|
|||
|
||||
/* hooker of plugin, the first parameter should be xce_sched_plugin_t */
|
||||
typedef int (*plugin_update_config_hook_t)(void*, xce_conf4sched_t*);
|
||||
typedef int (*plugin_update_queue_hook_t)(void*, xce_sched_queue_t*);
|
||||
typedef int (*plugin_update_job_hook_t)(void*, xce_sched_job_t*);
|
||||
typedef int (*plugin_update_worker_hook_t)(void*, xce_sched_worker_t*);
|
||||
typedef int (*plugin_update_queue_hook_t)(void*, xce_sched_queue_t*,
|
||||
xce_sched_queue_t*);
|
||||
typedef int (*plugin_update_job_hook_t)(void*, xce_sched_job_t*,
|
||||
xce_sched_job_t*);
|
||||
typedef int (*plugin_update_worker_hook_t)(void*, xce_sched_worker_t*,
|
||||
xce_sched_worker_t*);
|
||||
typedef int (*plugin_commit_decision_hook_t)(void*, xce_decision_t*);
|
||||
|
||||
/* initialize function of plugin */
|
||||
|
|
@ -56,9 +59,10 @@ typedef struct {
|
|||
extern int plugin_register(void*, void*);
|
||||
extern void plugin_unregister(void*);
|
||||
extern int plugin_config_update(void*, xce_conf4sched_t*);
|
||||
extern int plugin_queue_update(void*, xce_sched_queue_t*);
|
||||
extern int plugin_job_update(void*, xce_sched_job_t*);
|
||||
extern int plugin_worker_update(void*, xce_sched_worker_t*);
|
||||
extern int plugin_queue_update(void*, xce_sched_queue_t*, xce_sched_queue_t*);
|
||||
extern int plugin_job_update(void*, xce_sched_job_t*, xce_sched_job_t*);
|
||||
extern int plugin_worker_update(void*, xce_sched_worker_t*,
|
||||
xce_sched_worker_t*);
|
||||
extern int plugin_begin_session(void*);
|
||||
extern int plugin_end_session(void*);
|
||||
extern int plugin_commit_decision(void*, xce_decision_t*);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ typedef struct {
|
|||
time_t queue_time;
|
||||
time_t start_time;
|
||||
unsigned int state;
|
||||
unsigned int starting : 1;
|
||||
int32_t priority;
|
||||
xce_sched_queue_t* queue;
|
||||
xce_sched_user_t* user;
|
||||
|
|
|
|||
|
|
@ -82,5 +82,6 @@ extern int sched_job_is_ready(xce_sched_job_t*);
|
|||
extern int sched_queue_is_ready(xce_sched_queue_t*);
|
||||
extern int sched_commit_decision(xce_scheduler_t*, xce_decision_t*);
|
||||
extern int sched_publish_pend_reason(xce_scheduler_t*, xce_preason_set_t*);
|
||||
extern int sched_publish_dispatch(xce_scheduler_t*, xce_job_dispatch_t*);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue