mirror of https://github.com/BOINC/boinc.git
remote job submission:
create_batch(): generate batch name if not supplied Finish query_completed_job()
This commit is contained in:
parent
1a51b7fc11
commit
fdc6692734
|
@ -31,6 +31,7 @@ if (!$offset) $offset=0;
|
|||
$items_per_page = 20;
|
||||
|
||||
$user = BoincUser::lookup_id($userid);
|
||||
if (!$user) error_page('no such user');
|
||||
$logged_in_user = get_logged_in_user(false);
|
||||
BoincForumPrefs::lookup($logged_in_user);
|
||||
|
||||
|
|
|
@ -571,6 +571,9 @@ function create_batch($r) {
|
|||
list($user, $user_submit) = check_remote_submit_permissions($r, $app);
|
||||
$now = time();
|
||||
$batch_name = (string)($r->batch_name);
|
||||
if (!$batch_name) {
|
||||
$batch_name = make_batch_name($user, $app);
|
||||
}
|
||||
$batch_name = BoincDb::escape_string($batch_name);
|
||||
$expire_time = (double)($r->expire_time);
|
||||
$state = BATCH_STATE_INIT;
|
||||
|
|
|
@ -94,7 +94,7 @@ class BOINC_SERVER:
|
|||
def submit_batch(self, batch_desc):
|
||||
return self.do_http_post(self.batch_desc_xml(batch_desc, 'submit_batch'))
|
||||
|
||||
def create_batch(self, app_name, batch_name, expire_time):
|
||||
def create_batch(self, app_name, batch_name='', expire_time=0):
|
||||
return self.do_http_post(
|
||||
self.create_batch_xml(app_name, batch_name, expire_time)
|
||||
)
|
||||
|
@ -116,11 +116,11 @@ class BOINC_SERVER:
|
|||
def query_batches(self, get_cpu_time):
|
||||
return self.do_http_post(self.query_batches_xml(get_cpu_time))
|
||||
|
||||
########## job operations
|
||||
|
||||
def query_completed_job(self, job_name):
|
||||
return self.do_http_post(self.query_completed_job_xml(job_name))
|
||||
|
||||
########## job operations
|
||||
|
||||
def abort_jobs(self, job_names):
|
||||
return self.do_http_post(self.abort_jobs_xml(job_names))
|
||||
|
||||
|
@ -290,6 +290,13 @@ class BOINC_SERVER:
|
|||
'</query_batches>\n'
|
||||
) %(self.authenticator, 1 if get_cpu_time else 0)
|
||||
|
||||
def query_completed_job_xml(self, job_name):
|
||||
return ('<query_completed_job>\n'
|
||||
'<authenticator>%s</authenticator>\n'
|
||||
'<job_name>%s</job_name>\n'
|
||||
'</query_completed_job>\n'
|
||||
) %(self.authenticator, job_name)
|
||||
|
||||
def abort_jobs_xml(self, job_names):
|
||||
xml = ('<abort_jobs>\n'
|
||||
'<authenticator>%s</authenticator>\n'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# THIS IS DEPRECATED. USE boinc_submit.py INSTEAD
|
||||
|
||||
# This file is part of BOINC.
|
||||
# http://boinc.berkeley.edu
|
||||
# Copyright (C) 2020 University of California
|
||||
|
|
Loading…
Reference in New Issue