Back to index

nordugrid-arc-nox  1.1.0~rc6
Functions
manage_jobq.cpp File Reference
#include <iostream>
#include "job_queue.h"

Go to the source code of this file.

Functions

static void dump (int argc, char **argv)
static void remove (int argc, char **argv)
int main (int argc, char **argv)

Function Documentation

static void dump ( int  argc,
char **  argv 
) [static]

Definition at line 9 of file manage_jobq.cpp.

{
    if (argc != 3) {
        std::cerr << "Invalid argument" << std::endl;
        return;
    }
    Arc::JobQueue jobq;
    jobq.init(argv[2], "jobq");
    for (Arc::JobQueueIterator it = jobq.getAll(); it.hasMore(); it++) {
        Arc::Job *j = *it;
        std::cout << "-------------------" << std::endl;
        std::cout << (std::string)*j << std::endl;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 37 of file manage_jobq.cpp.

{
    if (argc < 2) {
        std::cerr << "Invalid argument" << std::endl;
        return -1;
    }
    std::string cmd = argv[1];
    if (cmd == "dump") {
        dump(argc, argv);
    } else if (cmd == "remove") {
        remove(argc, argv);
    } else {
        std::cerr << "Unknown command: " << cmd << std::endl;
        return -1;
    }
    return 0;
}

Here is the call graph for this function:

static void remove ( int  argc,
char **  argv 
) [static]

Definition at line 25 of file manage_jobq.cpp.

{
    if (argc != 4) {
        std::cerr << "Invalid argument" << std::endl;
        return;
    }
    Arc::JobQueue jobq;
    jobq.init(argv[2], "jobq");
    std::string job_id = argv[3];
    jobq.remove(job_id);
}

Here is the call graph for this function: