Changeset 19479 for trunk/FACT++
- Timestamp:
- 04/01/19 09:58:56 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/scheduler.cc
r19468 r19479 576 576 Info("A source with the same name (key="+to_string(source_key)+") was found in the Source table."); 577 577 } 578 578 /* 579 579 if (source_key<0) 580 580 { … … 598 598 599 599 } 600 600 */ 601 601 Out() << Time()-stopwatch << endl; 602 602 … … 784 784 Info("Source will be scheduled."); 785 785 786 if (source_key<0) 787 { 788 const string query = 789 "INSERT INTO Source\n" 790 " (fSourceName, fRightAscension, fDeclination, fWobbleAngle0, fWobbleAngle1, fSourceTypeKey, fIsToO) VALUES\n" 791 " ('"+name+"', "+to_string(ra/15.)+", "+to_string(dec)+", "+to_string(wobble_angle-90)+", "+to_string(wobble_angle+90)+", 1, 1)"; 792 793 if (!fDryRun) 794 { 795 auto q = fConnection.query(query); 796 q.execute(); 797 Info(q.info()); 798 799 source_key = q.insert_id(); 800 801 Info(string(fDryRun?"[dry-run] ":"")+"The new source got the key "+to_string(source_key)); 802 } 803 else 804 Out() << query << endl; 805 806 } 807 808 Out() << Time()-stopwatch << endl; 809 810 // ==================================================================== 811 786 812 vector<string> insert; 787 813
Note:
See TracChangeset
for help on using the changeset viewer.