Skip to content

Commit

Permalink
Condor: debug set_expire_time RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpanderson committed Sep 18, 2013
1 parent 34933c8 commit 3e21e8b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions db/schema_condor.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ create table batch_file_assoc (

alter table batch_file_assoc
add unique(job_file_id, batch_id);

alter table workunit
add index wu_batch(batch);
3 changes: 2 additions & 1 deletion html/user/submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ function handle_query_batch($user) {
row2("state", batch_state_string($batch->state));
row2("# jobs", $batch->njobs);
row2("# error jobs", $batch->nerror_jobs);
row2("logical end time", time_str($batch->logical_end_time));
//row2("logical end time", time_str($batch->logical_end_time));
row2("expiration time", time_str($batch->expire_time));
row2("progress", sprintf("%.0f%%", $batch->fraction_done*100));
if ($batch->completion_time) {
row2("completed", local_time_str($batch->completion_time));
Expand Down
1 change: 1 addition & 0 deletions html/user/submit_rpc_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ function ping($r) {
case 'query_job': query_job($r); break;
case 'query_completed_job': query_completed_job($r); break;
case 'retire_batch': handle_retire_batch($r); break;
case 'set_expire_time': handle_set_expire_time($r); break;
case 'submit_batch': submit_batch($r); break;
default: xml_error(-1, "bad command: ".$r->getName());
}
Expand Down
1 change: 1 addition & 0 deletions lib/remote_submit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ int set_expire_time(
sprintf(buf, "<batch_name>%s</batch_name>\n", batch_name);
request += string(buf);
sprintf(buf, "<expire_time>%f</expire_time>\n", expire_time);
request += string(buf);
request += "</set_expire_time>\n";
sprintf(url, "%ssubmit_rpc_handler.php", project_url);
FILE* reply = tmpfile();
Expand Down
2 changes: 2 additions & 0 deletions samples/condor/request_gen
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// stderr_out1, stderr_out2: stderr output of the 2 jobs

$t = time();
$expire = $t + 86400;
$batch_name = "batch_$t";
$job_name_1 = "job1_$t";
$job_name_2 = "job2_$t";
Expand All @@ -21,5 +22,6 @@ BOINC_ABORT_JOBS 6 $job_name_1 $job_name_2
BOINC_FETCH_OUTPUT 3 $job_name_1 . stderr_out1 ALL 1 out out1
BOINC_FETCH_OUTPUT 4 $job_name_2 . stderr_out2 ALL 1 out out2
BOINC_RETIRE_BATCH 5 $batch_name
BOINC_SET_LEASE 6 $batch_name $expire
";
?>

0 comments on commit 3e21e8b

Please sign in to comment.