atris 3.15.38 → 3.15.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/mission.js +7 -3
- package/package.json +1 -1
package/commands/mission.js
CHANGED
|
@@ -763,9 +763,13 @@ function selectDueMission(root = process.cwd(), now = new Date()) {
|
|
|
763
763
|
.filter((mission) => missionDueAt(mission, now));
|
|
764
764
|
|
|
765
765
|
candidates.sort((a, b) => {
|
|
766
|
-
const
|
|
767
|
-
const
|
|
768
|
-
return
|
|
766
|
+
const aCaller = runnerUsesCallerSession(a.runner) ? 1 : 0;
|
|
767
|
+
const bCaller = runnerUsesCallerSession(b.runner) ? 1 : 0;
|
|
768
|
+
if (aCaller !== bCaller) return bCaller - aCaller;
|
|
769
|
+
|
|
770
|
+
const aTime = missionSortTime(a);
|
|
771
|
+
const bTime = missionSortTime(b);
|
|
772
|
+
return bTime - aTime;
|
|
769
773
|
});
|
|
770
774
|
return candidates[0] || null;
|
|
771
775
|
}
|