Created
July 5, 2021 04:14
-
-
Save re4388/031a4a89cf81dbc1db9d62d76aedf323 to your computer and use it in GitHub Desktop.
tmp
This file contains hidden or 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
export enum PreprocessStatus { | |
COMPLETE = 'complete', | |
INCOMPLETE = 'incomplete', | |
} | |
export type NA = 'NA'; | |
/** | |
* SeriesRemoteCacheStatus for Series level | |
*/ | |
interface SeriesRemoteCacheStatus { | |
/** | |
* partition key | |
*/ | |
seriesUid: string; | |
/** | |
* sort key | |
*/ | |
imageFileUid: NA; | |
/** | |
* attribute to track the remote cache status | |
*/ | |
preprocessStatus: PreprocessStatus; | |
} | |
/** | |
* SeriesRemoteCacheStatus for imageFile level | |
*/ | |
interface ImageFileRemoteCacheStatus { | |
/** | |
* partition key | |
*/ | |
seriesUid: string; | |
/** | |
* sort key | |
*/ | |
imageFileUid: string; | |
/** | |
* attribute to track the remote cache status | |
*/ | |
preprocessStatus: PreprocessStatus; | |
} | |
@injectable() | |
export class SeriesRemoteCacheStatusAccess { | |
private static readonly log: Logger = getLog( | |
'SeriesRemoteCacheStatusDBService', | |
SeriesRemoteCacheStatusAccess | |
); | |
@inject(BINDING_ID_DEPLOYMENT_INFO) | |
private readonly deploymentInfo!: DeploymentInfo; | |
public async saveImageFileUid({ | |
seriesUid, | |
imageFileUid, | |
preprocessStatus, | |
}: ImageFileRemoteCacheStatus): Promise<void | undefined>; | |
public async deleteSeriesRemoteCache( | |
seriesUid: string, | |
imageFileUid: string | |
): Promise<undefined | void>; | |
public async getImageFilePreprocessStatus( | |
seriesUid: string, | |
imageFileUid: string | |
): Promise<PreprocessStatus | undefined>; | |
public async setSeriesPreprocessStatus( | |
seriesUid: string, | |
imageFileUid: string | |
): Promise<void | undefined>; | |
public async getSeriesPreprocessStatus( | |
seriesUid: string, | |
imageFileUid: string | |
): Promise<PreprocessStatus | undefined>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment