Add Prettier and ESLint tooling (Refs #77)
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
/** File/history unit tests simulate the activation leaf. Provisioning tests cover
|
||||
* the occupancy, capacity, source, and restart gates before reaching this leaf. */
|
||||
export async function activateFiles(kind: 'beta' | 'campaign', id: number | string): Promise<void> {
|
||||
const { stagedFileChanges, applyStagedFilesForOperation } = await import('../../src/lib/server/fleet/staged-files.js');
|
||||
const { stagedFileChanges, applyStagedFilesForOperation } =
|
||||
await import('../../src/lib/server/fleet/staged-files.js');
|
||||
const { requestRestart } = await import('../../src/lib/server/provisioning/index.js');
|
||||
for (const server of new Set(stagedFileChanges(kind, String(id)).filter(row => row.state === 'pending').map(row => row.server))) {
|
||||
for (const server of new Set(
|
||||
stagedFileChanges(kind, String(id))
|
||||
.filter((row) => row.state === 'pending')
|
||||
.map((row) => row.server)
|
||||
)) {
|
||||
const operation = requestRestart(server, { kind, id: String(id) });
|
||||
applyStagedFilesForOperation(operation.id, server);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user