Changes between Version 39 and Version 40 of RemoteJobs


Ignore:
Timestamp:
Oct 22, 2013, 4:32:58 PM (11 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemoteJobs

    v39 v40  
    270270=== query_batches() ===
    271271
    272 Query the status of a set of batches.
    273 {{{
    274 extern int query_batches(
    275     const char* project_url,
    276     const char* authenticator,
    277     vector<string> &batch_names,
    278     QUERY_BATCH_REPLY& reply,
    279     string& error_msg
    280 );
    281 
    282 struct QUERY_BATCH_JOB {
    283     string job_name;
    284     string status;              // DONE, ERROR, or IN_PROGRESS
    285     QUERY_BATCH_JOB(){}
    286 };
    287 
    288 struct QUERY_BATCH_REPLY {
    289     vector<int> batch_sizes;    // how many jobs in each of the queried batches
    290     vector<QUERY_BATCH_JOB> jobs;   // the jobs, sequentially
     272Query the status of this user's batches.
     273
     274{{{
     275int query_batches(
     276    const char* project_url,
     277    const char* authenticator,
     278    vector<BATCH_STATUS>& batches,
     279    string& error_msg
     280);
     281
     282struct BATCH_STATUS {
     283    int id;
     284    char name[256];             // name of batch
     285    char app_name[256];
     286    int state;                  // see lib/common_defs.h
     287    int njobs;                  // how many jobs in batch
     288    int nerror_jobs;            // how many jobs errored out
     289    double fraction_done;       // how much of batch is done (0..1)
     290    double create_time;         // when batch was created
     291    double expire_time;         // when it will expire
     292    double est_completion_time;     // estimated completion time
     293    double completion_time;     // if completed, actual completion time
     294    double credit_estimate;     // original estimate for credit
     295    double credit_canonical;    // if completed, granted credit
     296
     297    int parse(XML_PARSER&);
     298    void print();
     299};
     300}}}
     301
     302=== query_batch() ===
     303
     304Return the detailed status of jobs in a given batch (can specify by either ID or name).
     305
     306{{{
     307extern int query_batch(
     308    const char* project_url,
     309    const char* authenticator,
     310    int batch_id,
     311    const char batch_name[256],
     312    vector<JOB_STATE>& jobs,
     313    string& error_msg
     314);
     315
     316struct JOB_STATE {
     317    int id;
     318    char name[256];
     319    int canonical_instance_id;      // it job completed successfully,
     320                                    // the ID of the canonical instance
     321    int n_outfiles;                 // number of output files
    291322};
    292323
     
    374405}}}
    375406
     407=== query_batch_set() ===
     408
     409Return the status of the jobs in a given set of batches.
     410This is used by the Condor interface; it's probably not useful outside of that.
     411{{{
     412extern int query_batch_set(
     413    const char* project_url,
     414    const char* authenticator,
     415    vector<string> &batch_names,
     416    QUERY_BATCH_REPLY& reply,
     417    string& error_msg
     418);
     419
     420struct JOB_STATUS {
     421    string job_name;
     422    string status;              // DONE, ERROR, or IN_PROGRESS
     423};
     424
     425struct QUERY_BATCH_SET_REPLY {
     426    vector<int> batch_sizes;    // how many jobs in each of the queried batches
     427    vector<JOB_STATUS> jobs;   // the jobs, sequentially
     428};
     429
     430}}}
    376431
    377432== HTTP/XML interface ==
     
    392447However, you will have to modify it heavily for your particular
    393448applications and web site.
     449