Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/course/compute/util.ts
1503 views
1
// for tasks that are "easy" to run in parallel, e.g. run code in compute servers
2
export const MAX_PARALLEL_TASKS = 30;
3
4
export function getUnitId(unit): string {
5
const id = unit.get("assignment_id") ?? unit.get("handout_id");
6
if (id == null) {
7
throw Error("one of assignment_id or handout_id of unit must be defined");
8
}
9
return id;
10
}
11
12