Changeset 10624 for trunk/FACT++/src/scheduler.cc
- Timestamp:
- 05/08/11 21:48:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/scheduler.cc
r10618 r10624 58 58 59 59 60 // config parameters 61 // mintime62 // runtimec63 // runtimep64 // repostime60 // config parameters: 61 // mintime 62 // runtimec 63 // runtimep 64 // repostime 65 65 66 66 // missing: … … 69 69 // calculate sun set/rise 70 70 // 71 // check for double std sources 72 // 73 // return errors 74 // get input from sendcommand 71 // return errors and other otherput from sendcommand to webinterface 75 72 76 73 // in which cases should the scheduler go in error state? … … 173 170 174 171 int fSessionId; 172 string fDBName; 175 173 176 174 … … 189 187 cout << "Scheduling for the period from " << startsched << " to " << stopsched << endl; 190 188 191 stringstream str;192 str << "Scheduling started -> Preview (id=" << fSessionId << ")";193 T::Message(str);194 195 189 static const boost::regex expr("(([[:word:].-]+)(:(.+))?@)?([[:word:].-]+)(:([[:digit:]]+))?(/([[:word:].-]+))"); 196 190 // 2: user … … 216 210 const string passwd = what[4]; 217 211 const string server = what[5]; 218 const string db = what[9]; 212 string db = what[9]; 213 if (fDBName.size()!=0) 214 db = fDBName; 219 215 const int port = atoi(string(what[7]).c_str()); 216 217 stringstream dbnamemsg; 218 dbnamemsg << "Scheduling started -> using database " << fDBName << "."; 219 T::Message(dbnamemsg); 220 220 221 221 cout << "Connecting to '"; … … 633 633 */ 634 634 635 AutoScheduler(ostream &out=cout) : T(out, "SCHEDULER"), fNextIsPreview(true), fSessionId(-1) 635 AutoScheduler(ostream &out=cout) : T(out, "SCHEDULER"), fNextIsPreview(true), fSessionId(-1), fDBName("") 636 636 { 637 637 AddStateName(kSM_Scheduling, "Scheduling"); … … 662 662 { 663 663 case kSM_Scheduling: 664 if (evt.GetSize()>0) 665 fDBName = evt.GetString(); 664 666 //case kSM_Comitting: 665 667 //fSessionId = evt.GetInt(); … … 674 676 } 675 677 }; 678 676 679 677 680 // ------------------------------------------------------------------------ … … 771 774 } 772 775 773 //if (conf.Has("mintime"))774 // cout << "has mintime --------------------+" << conf.Get<int>("mintime")<< "+------------" << endl;775 776 776 if (conf.Has("database")) 777 { 777 778 database = conf.Get<string>("database").c_str(); 779 } 778 780 else 779 781 { … … 781 783 return -1; 782 784 } 783 784 785 785 786 if (conf.HasHelp() || conf.HasPrint())
Note:
See TracChangeset
for help on using the changeset viewer.