File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ void TaskScheduler::PutRecoveredTaskIntoRunningQueueLock_(
518
518
for (const CranedId& craned_id : task->CranedIds ())
519
519
g_meta_container->MallocResourceFromNode (craned_id, task->TaskId (),
520
520
task->resources );
521
-
521
+ g_licenses_manager-> MallocLicenseResource (task-> licenses_count );
522
522
// The order of LockGuards matters.
523
523
LockGuard running_guard (&m_running_task_map_mtx_);
524
524
LockGuard indexes_guard (&m_task_indexes_mtx_);
@@ -2659,13 +2659,14 @@ CraneErr TaskScheduler::AcquireTaskAttributes(TaskInCtld* task) {
2659
2659
for (auto && node : nodes) task->excluded_nodes .emplace (std::move (node));
2660
2660
}
2661
2661
2662
- auto check_licenses_result = g_licenses_manager->CheckLicensesLegal (task->TaskToCtld ().licenses_count ());
2662
+ auto check_licenses_result = g_licenses_manager->CheckLicensesLegal (
2663
+ task->TaskToCtld ().licenses_count ());
2663
2664
if (check_licenses_result.has_error ()) {
2664
2665
CRANE_ERROR (" Failed to call CheckLicensesLegal: {}" ,
2665
2666
check_licenses_result.error ());
2666
2667
2667
2668
return CraneErr::kInvalidParam ;
2668
- }
2669
+ }
2669
2670
2670
2671
return CraneErr::kOk ;
2671
2672
}
You can’t perform that action at this time.
0 commit comments