~ubuntu-branches/debian/sid/boinc/sid

« back to all changes in this revision

Viewing changes to sched/assimilator.cpp

  • Committer: Package Import Robot
  • Author(s): Steffen Moeller
  • Date: 2011-08-08 01:36:51 UTC
  • mfrom: (6.1.11 experimental)
  • Revision ID: package-import@ubuntu.com-20110808013651-m1hs3cltiveuteyn
Tags: 6.13.1+dfsg-2
* Bringing notify patch to unstable.
* Adjusted build dependency to libjpeg-dev (Closes: #641093)
* Further improvements on stripchart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
int one_pass_N_WU=0;
54
54
int g_argc;
55
55
char** g_argv;
 
56
char* results_prefix = NULL;
 
57
char* transcripts_prefix = NULL;
56
58
 
57
59
void usage(char** argv) {
58
60
    fprintf(stderr,
156
158
        retval = assimilate_handler(wu, results, canonical_result);
157
159
        if (retval && retval != DEFER_ASSIMILATION) {
158
160
            log_messages.printf(MSG_CRITICAL,
159
 
                "[%s] handler returned error %d; exiting\n", wu.name, retval
 
161
                "[%s] handler error: %s; exiting\n", wu.name, boincerror(retval)
160
162
            );
161
163
            exit(retval);
162
164
        }
168
170
                assimilate_state = ASSIMILATE_INIT;
169
171
            }
170
172
            sprintf(
171
 
                buf, "assimilate_state=%d, transition_time=%d", 
 
173
                buf, "assimilate_state=%d, transition_time=%d",
172
174
                assimilate_state, (int)time(0)
173
175
            );
174
176
            retval = wu.update_field(buf);
175
177
            if (retval) {
176
178
                log_messages.printf(MSG_CRITICAL,
177
 
                    "[%s] update failed: %d\n", wu.name, retval
 
179
                    "[%s] update failed: %s\n", wu.name, boincerror(retval)
178
180
                );
179
181
                exit(1);
180
182
            }
230
232
            // your project.
231
233
            update_db = false;
232
234
        } else if (is_arg(argv[i], "noinsert")) {
233
 
            // This option is also for testing and is used to 
 
235
            // This option is also for testing and is used to
234
236
            // prevent the inserting of results into the *backend*
235
237
            // (as opposed to the boinc) DB.
236
238
            noinsert = true;
242
244
        } else if (is_arg(argv[i], "v") || is_arg(argv[i], "version")) {
243
245
            printf("%s\n", SVN_VERSION);
244
246
            exit(0);
 
247
        } else if (is_arg(argv[i], "results_prefix")) {
 
248
            results_prefix=argv[++i];
 
249
        } else if (is_arg(argv[i], "transcripts_prefix")) {
 
250
            transcripts_prefix=argv[++i];
245
251
        } else {
246
252
            log_messages.printf(MSG_CRITICAL, "Unrecognized arg: %s\n", argv[i]);
247
253
            usage(argv);
282
288
    }
283
289
    install_stop_signal_handler();
284
290
    do {
285
 
      if (!do_pass(app)) {
286
 
        if (!one_pass) {
287
 
          sleep(sleep_interval);
 
291
        if (!do_pass(app)) {
 
292
            if (!one_pass) {
 
293
                sleep(sleep_interval);
 
294
            }
288
295
        }
289
 
      }
290
296
    } while (!one_pass);
291
297
}
292
298
 
293
299
 
294
 
const char *BOINC_RCSID_7841370789 = "$Id: assimilator.cpp 22033 2010-07-22 18:22:14Z davea $";
 
300
const char *BOINC_RCSID_7841370789 = "$Id: assimilator.cpp 23241 2011-03-18 08:20:11Z bema $";