-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e12947e
commit 05d7766
Showing
3 changed files
with
2 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,24 @@ | ||
import { sanitizeNodes } from './sanitizeNodes' | ||
import { addSecondaries } from './addSecondaries' | ||
import { syncNodes } from './syncNodes' | ||
import { rolloverNodes } from './rolloverNodes' | ||
import { needsRecoveryEmail } from './needsRecoveryEmail' | ||
import { assignReplicaSetIfNecessary } from './assignReplicaSetIfNecessary' | ||
import type { AudiusLibs } from '../AudiusLibs' | ||
import type { Nullable } from '../utils' | ||
|
||
// Checks to run at startup to ensure a user is in a good state. | ||
export class SanityChecks { | ||
libs: AudiusLibs | ||
options: { skipRollover: boolean } | ||
|
||
constructor(libsInstance: AudiusLibs, options = { skipRollover: false }) { | ||
constructor(libsInstance: AudiusLibs) { | ||
this.libs = libsInstance | ||
this.options = options | ||
} | ||
|
||
/** | ||
* Runs sanity checks | ||
*/ | ||
async run(creatorNodeWhitelist: Nullable<Set<string>> = null) { | ||
await sanitizeNodes(this.libs) | ||
async run() { | ||
await addSecondaries(this.libs) | ||
await assignReplicaSetIfNecessary(this.libs) | ||
await syncNodes(this.libs) | ||
if (!this.options.skipRollover) { | ||
await rolloverNodes(this.libs, creatorNodeWhitelist) | ||
} | ||
await needsRecoveryEmail(this.libs) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.