~ubuntu-branches/ubuntu/precise/nordugrid-arc/precise

« back to all changes in this revision

Viewing changes to src/hed/libs/client/JobSupervisor.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-03-01 19:48:16 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120301194816-m1ezrwnwt2qgnc2e
Tags: 1.1.1-1
* 1.1.1 Bugfix Release
* Fixes FTBFS (Closes: #661774) (LP: #935007)
* Fix typo in package description (Closes: #646979)
* Split binary rule in debian/rules for arch and indep

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
           it != (*itJobC)->jobstore.end(); it++) {
192
192
 
193
193
        if (!it->State) {
194
 
          logger.msg(WARNING, "Unable to get job (%s), job information not found at execution service", it->JobID.str());
 
194
          logger.msg(WARNING, "Unable to get job (%s), job information not found at execution service", it->JobID.fullstr());
195
195
          continue;
196
196
        }
197
197
 
202
202
        }
203
203
 
204
204
        if (it->State == JobState::DELETED) {
205
 
          logger.msg(WARNING, "Unable to get job (%s), job is deleted", it->JobID.str());
 
205
          logger.msg(WARNING, "Unable to get job (%s), job is deleted", it->JobID.fullstr());
206
206
          continue;
207
207
        }
208
208
        else if (!it->State.IsFinished()) {
209
 
          logger.msg(WARNING, "Unable to get job (%s), it has not finished yet", it->JobID.str());
 
209
          logger.msg(WARNING, "Unable to get job (%s), it has not finished yet", it->JobID.fullstr());
210
210
          continue;
211
211
        }
212
212
 
216
216
      for (std::list<Job*>::iterator it = downloadable.begin();
217
217
           it != downloadable.end(); it++) {
218
218
        if (!(*itJobC)->GetJob(**it, downloaddir, usejobname, force)) {
219
 
          logger.msg(ERROR, "Failed getting job (%s)", (*it)->JobID.str());
 
219
          logger.msg(ERROR, "Failed getting job (%s)", (*it)->JobID.fullstr());
220
220
          ok = false;
221
221
        }
222
222
        else {
242
242
           it != (*itJobC)->jobstore.end(); it++) {
243
243
 
244
244
        if (!it->State) {
245
 
          logger.msg(WARNING, "Unable to kill job (%s), job information not found at execution service", it->JobID.str());
 
245
          logger.msg(WARNING, "Unable to kill job (%s), job information not found at execution service", it->JobID.fullstr());
246
246
          continue;
247
247
        }
248
248
 
253
253
        }
254
254
 
255
255
        if (it->State == JobState::DELETED) {
256
 
          logger.msg(WARNING, "Unable to kill job (%s), job is deleted", it->JobID.str());
 
256
          logger.msg(WARNING, "Unable to kill job (%s), job is deleted", it->JobID.fullstr());
257
257
          continue;
258
258
        }
259
259
        else if (it->State.IsFinished()) {
260
 
          logger.msg(WARNING, "Unable to kill job (%s), job has already finished", it->JobID.str());
 
260
          logger.msg(WARNING, "Unable to kill job (%s), job has already finished", it->JobID.fullstr());
261
261
          continue;
262
262
        }
263
263
 
267
267
      for (std::list<Job*>::iterator it = killable.begin();
268
268
           it != killable.end(); it++) {
269
269
        if (!(*itJobC)->CancelJob(**it)) {
270
 
          logger.msg(ERROR, "Failed killing job (%s)", (*it)->JobID.str());
 
270
          logger.msg(ERROR, "Failed killing job (%s)", (*it)->JobID.fullstr());
271
271
          ok = false;
272
272
        }
273
273
        else {
293
293
           it != (*itJobC)->jobstore.end(); it++) {
294
294
 
295
295
        if (!it->State) {
296
 
          logger.msg(WARNING, "Unable to renew job (%s), job information not found at execution service", it->JobID.str());
 
296
          logger.msg(WARNING, "Unable to renew job (%s), job information not found at execution service", it->JobID.fullstr());
297
297
          continue;
298
298
        }
299
299
 
304
304
        }
305
305
 
306
306
        if (it->State == JobState::FINISHED || it->State == JobState::KILLED || it->State == JobState::DELETED) {
307
 
          logger.msg(WARNING, "Unable to renew job (%s), job already finished", it->JobID.str());
 
307
          logger.msg(WARNING, "Unable to renew job (%s), job already finished", it->JobID.fullstr());
308
308
          continue;
309
309
        }
310
310
 
314
314
      for (std::list<Job*>::iterator it = renewable.begin();
315
315
           it != renewable.end(); it++) {
316
316
        if (!(*itJobC)->RenewJob(**it)) {
317
 
          logger.msg(ERROR, "Failed renewing job (%s)", (*it)->JobID.str());
 
317
          logger.msg(ERROR, "Failed renewing job (%s)", (*it)->JobID.fullstr());
318
318
          ok = false;
319
319
        }
320
320
        else {
340
340
           it != (*itJobC)->jobstore.end(); it++) {
341
341
 
342
342
        if (!it->State) {
343
 
          logger.msg(WARNING, "Unable to resume job (%s), job information not found", it->JobID.str());
 
343
          logger.msg(WARNING, "Unable to resume job (%s), job information not found", it->JobID.fullstr());
344
344
          continue;
345
345
        }
346
346
 
351
351
        }
352
352
 
353
353
        if (it->State == JobState::FINISHED || it->State == JobState::KILLED || it->State == JobState::DELETED) {
354
 
          logger.msg(WARNING, "Unable to resume job (%s), job is %s and cannot be resumed", it->JobID.str(), it->State.GetGeneralState());
 
354
          logger.msg(WARNING, "Unable to resume job (%s), job is %s and cannot be resumed", it->JobID.fullstr(), it->State.GetGeneralState());
355
355
          continue;
356
356
        }
357
357
 
361
361
      for (std::list<Job*>::iterator it = resumable.begin();
362
362
           it != resumable.end(); it++) {
363
363
        if (!(*itJobC)->ResumeJob(**it)) {
364
 
          logger.msg(ERROR, "Failed resuming job %s", (*it)->JobID.str());
 
364
          logger.msg(ERROR, "Failed resuming job %s", (*it)->JobID.fullstr());
365
365
          ok = false;
366
366
        }
367
367
        else {
469
469
        continue;
470
470
      }
471
471
      jobdescs.front().Identification.ActivityOldId = (*it)->ActivityOldID;
472
 
      jobdescs.front().Identification.ActivityOldId.push_back((*it)->JobID.str());
 
472
      jobdescs.front().Identification.ActivityOldId.push_back((*it)->JobID.fullstr());
473
473
 
474
474
      // remove the queuename which was added during the original submission of the job
475
475
      jobdescs.front().Resources.QueueName = "";
576
576
        continue;
577
577
      }
578
578
      jobdescs.front().Identification.ActivityOldId = (*itJ)->ActivityOldID;
579
 
      jobdescs.front().Identification.ActivityOldId.push_back((*itJ)->JobID.str());
 
579
      jobdescs.front().Identification.ActivityOldId.push_back((*itJ)->JobID.fullstr());
580
580
 
581
581
      // remove the queuename which was added during the original submission of the job
582
582
      jobdescs.front().Resources.QueueName = "";