- create_work: allow multiple URLs for non-local input files

(from Zoltan Farkas)
- scheduler: fix message describing per-app limits


svn path=/trunk/boinc/; revision=23546
This commit is contained in:
David Anderson 2011-05-13 18:40:10 +00:00
parent a7cb3f6a6d
commit 51c652640f
4 changed files with 32 additions and 11 deletions

View File

@ -2957,4 +2957,15 @@ Charlie 13 May 2011
lib/
filesys.cpp
David 13 May 2011
- create_work: allow multiple URLs for non-local input files
(from Zoltan Farkas)
- scheduler: fix message describing per-app limits
sched/
sched_main.cpp
tools/
backend_lib.cpp
html/project.sample/
project.inc

View File

@ -28,10 +28,6 @@ define("UOTD_ADMIN_EMAIL", "admin@$master_url");
// offensive forum posts.
define("POST_REPORT_EMAILS", "moderator1@$master_url|moderator2@$master_url");
// set the following var if your project is behind a proxy.
// This is used on ops/index.php to get the current SVN rev from BOINC
//$project_http_proxy = "tcp://proxyname:port"
// set the following if SVN requires specific configuration (e.g. proxy)
// Used on ops/index.php.
// define("SVN_CONFIG_DIRECTORY", "/home/boincadm/.subversion/");

View File

@ -629,12 +629,15 @@ void JOB_LIMIT::print_log() {
}
void JOB_LIMITS::print_log() {
log_messages.printf(MSG_NORMAL, "[quota] Overall limit on jobs in progress:\n");
log_messages.printf(MSG_NORMAL, "[quota] Overall limits on jobs in progress:\n");
project_limits.print_log();
for (unsigned int i=0; i<app_limits.size(); i++) {
if (app_limits[i].any_limit()) {
APP* app = &ssp->apps[i];
log_messages.printf(MSG_NORMAL, "Limits for %s:\n", app->name);
APP* app = ssp->lookup_app_name(app_limits[i].app_name);
if (!app) continue;
log_messages.printf(MSG_NORMAL,
"[quota] Limits for %s:\n", app->name
);
app_limits[i].print_log();
}
}

View File

@ -24,6 +24,7 @@
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <ctime>
#include <cassert>
#include <unistd.h>
@ -197,6 +198,7 @@ static int process_wu_template(
out = "";
for (p=strtok(tmplate, "\n"); p; p=strtok(0, "\n")) {
if (match_tag(p, "<file_info>")) {
vector<string> urls;
bool generated_locally = false;
file_number = nbytesdef = -1;
md5str = urlstr = "";
@ -209,6 +211,7 @@ static int process_wu_template(
} else if (parse_bool(p, "generated_locally", generated_locally)) {
continue;
} else if (parse_str(p, "<url>", urlstr)) {
urls.push_back(urlstr);
continue;
} else if (parse_str(p, "<md5_cksum>", md5str)) {
continue;
@ -243,6 +246,8 @@ static int process_wu_template(
infiles[file_number]
);
} else if (nbytesdef == -1) {
// here if nybtes was not supplied; stage the file
//
dir_hier_path(
infiles[file_number], config_loc.download_dir,
config_loc.uldl_dir_fanout, path, true
@ -264,8 +269,7 @@ static int process_wu_template(
if (retval) {
fprintf(stderr, "process_wu_template: md5_file %d\n", retval);
return retval;
}
else if (config_loc.cache_md5_info) {
} else if (config_loc.cache_md5_info) {
write_md5_info(path, md5, nbytes);
}
}
@ -286,9 +290,16 @@ static int process_wu_template(
nbytes
);
} else {
// here if nbytes etc. was supplied,
// i.e the file is already staged, possibly remotely
//
urlstr = "";
for (unsigned int i=0; i<urls.size(); i++) {
urlstr += " <url>" + urls.at(i) + "</url>\n";
}
sprintf(buf,
" <name>%s</name>\n"
" <url>%s</url>\n"
"%s"
" <md5_cksum>%s</md5_cksum>\n"
" <nbytes>%.0f</nbytes>\n"
"</file_info>\n",