mirror of https://github.com/BOINC/boinc.git
create_work: add --continue_on_error option
This commit is contained in:
parent
3031d56363
commit
e5d845dad2
|
@ -1,6 +1,6 @@
|
||||||
// This file is part of BOINC.
|
// This file is part of BOINC.
|
||||||
// http://boinc.berkeley.edu
|
// http://boinc.berkeley.edu
|
||||||
// Copyright (C) 2014 University of California
|
// Copyright (C) 2015 University of California
|
||||||
//
|
//
|
||||||
// BOINC is free software; you can redistribute it and/or modify it
|
// BOINC is free software; you can redistribute it and/or modify it
|
||||||
// under the terms of the GNU Lesser General Public License
|
// under the terms of the GNU Lesser General Public License
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
bool verbose = false;
|
bool verbose = false;
|
||||||
|
bool continue_on_error = false;
|
||||||
|
|
||||||
void usage() {
|
void usage() {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
@ -296,6 +297,8 @@ int main(int argc, char** argv) {
|
||||||
jd.infiles.push_back(id);
|
jd.infiles.push_back(id);
|
||||||
} else if (arg(argv, i, "verbose")) {
|
} else if (arg(argv, i, "verbose")) {
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
} else if (arg(argv, i, "continue_on_error")) {
|
||||||
|
continue_on_error = true;
|
||||||
} else {
|
} else {
|
||||||
if (!strncmp("-", argv[i], 1)) {
|
if (!strncmp("-", argv[i], 1)) {
|
||||||
fprintf(stderr, "create_work: bad argument '%s'\n", argv[i]);
|
fprintf(stderr, "create_work: bad argument '%s'\n", argv[i]);
|
||||||
|
@ -420,8 +423,12 @@ int main(int argc, char** argv) {
|
||||||
);
|
);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
fprintf(stderr, "create_work() failed: %d\n", retval);
|
fprintf(stderr, "create_work() failed: %d\n", retval);
|
||||||
|
if (continue_on_error) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (values.size()) {
|
if (values.size()) {
|
||||||
values += ",";
|
values += ",";
|
||||||
values += value_buf;
|
values += value_buf;
|
||||||
|
|
Loading…
Reference in New Issue