chore: remove dead code from job.c/cluster.c (Part 1)
- job.c: remove unused #define NJOBS (100) constant - job.c: remove unused global uint64_t jobid = 100 - job.c: remove #if 0 dead block inside load_jobs() - cluster.c: expand cluster_build_groups() stub with TODO comment
This commit is contained in:
parent
9da6bbb260
commit
dffa44d59b
2 changed files with 5 additions and 28 deletions
|
|
@ -397,7 +397,11 @@ int cluster_build_queues(cluster_t* c)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int cluster_build_groups(cluster_t* c) { return 0; }
|
||||
int cluster_build_groups(cluster_t* c)
|
||||
{
|
||||
/* TODO: implement group building */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int xce_config_init(int type, int situation, void* data, va_list ap)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,10 +15,6 @@ static int mark_job_finish(cluster_t*, job_t*, xce_jobfinish_t*);
|
|||
static int mark_job_fail(cluster_t*, job_t*, job_failinfo_t*);
|
||||
static int mark_job_update(cluster_t*, job_t*, int);
|
||||
|
||||
#define NJOBS (100)
|
||||
|
||||
uint64_t jobid = 100;
|
||||
|
||||
static job_t* create_job(cluster_t* c, xce_job_t* j)
|
||||
{
|
||||
job_t* job = NULL;
|
||||
|
|
@ -62,29 +58,6 @@ uint64_t job_submit(void* c, xce_job_submit_t* submit)
|
|||
|
||||
int load_jobs(void* c)
|
||||
{
|
||||
#if 0
|
||||
job_t* job;
|
||||
int i;
|
||||
char cmdline[1024];
|
||||
|
||||
for (i = 1; i < NJOBS; i++) {
|
||||
sprintf(cmdline, "echo normal; sleep %d", i);
|
||||
job = create_job(c, jobid++, "normal", "rshen", "/home/rshen", "/tmp",
|
||||
"rshen", (char*)cmdline, NULL, 1, 1);
|
||||
if (job == NULL) {
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < NJOBS; i++) {
|
||||
job = create_job(c, jobid++, "xce", "rshen", "/home/rshen", "/tmp",
|
||||
"rshen", "echo xce; sleep 30", NULL, 1, 1);
|
||||
if (job == NULL) {
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue