Skip to content

Commit a05e426

Browse files
committed
tfscheduler: support cancellation of init process
1 parent 32a0b90 commit a05e426

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/TfScheduler/TfSchedulerDevice.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,18 @@ void TfSchedulerDevice::InitTask()
5757

5858
while (!mSchedInstance) {
5959
// prevent infinite looping. Look for the specified request for 5min and exit
60-
if (since<std::chrono::minutes>(mStartTime) > 10.0) {
60+
if (since<std::chrono::minutes>(mStartTime) > 30.0) {
6161
IDDLOG("Partition request not found. Exiting. partition={}", mPartitionId);
6262
ChangeState(fair::mq::Transition::ErrorFound);
6363
return;
6464
}
6565

66+
if (NewStatePending()) {
67+
IDDLOG("Exiting on request from control system.");
68+
ChangeState(fair::mq::Transition::ErrorFound);
69+
return;
70+
}
71+
6672
// check for new requests
6773
PartitionRequest lNewPartitionRequest;
6874
DDDLOG_RL(5000, "Checking for new partition creation requests.");

0 commit comments

Comments
 (0)