Skip to content

Instantly share code, notes, and snippets.

@re4388
Created July 5, 2021 04:14
Show Gist options
  • Save re4388/031a4a89cf81dbc1db9d62d76aedf323 to your computer and use it in GitHub Desktop.
Save re4388/031a4a89cf81dbc1db9d62d76aedf323 to your computer and use it in GitHub Desktop.
tmp
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