Changeset 4098
- Timestamp:
- Jan 23, 2008, 3:13:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/InternalJobQueue.java
r4078 r4098 433 433 if (job.getStatus() != Job.Status.WAITING) return; 434 434 435 // Change the status to Job.Status.PREPARED 436 job.setPrepared(Application.getHostName()); 437 try 438 { 439 dc.commit(); 440 } 441 catch (ItemModifiedException ex) 442 { 443 // Another thread or process has started the job already, return 444 // without starting the job 445 return; 446 } 447 finally 448 { 449 dc.close(); 450 } 451 // Now we know that noby else is trying to execute the job 452 // Reload the job again in a new DbControl 453 dc = impersonated.newDbControl(); 454 job = Job.getById(dc, jobId); 455 435 456 // Set the active project 436 457 int projectId = job.getActiveProjectId();
Note: See TracChangeset
for help on using the changeset viewer.