apify--crawlee
17 行
487 B
TypeScript
17 行
487 B
TypeScript
import { RequestQueueFileSystemEntry } from './fs';
|
|
import { RequestQueueMemoryEntry } from './memory';
|
|
|
|
export function createRequestQueueStorageImplementation(options: CreateStorageImplementationOptions) {
|
|
if (options.persistStorage) {
|
|
return new RequestQueueFileSystemEntry(options);
|
|
}
|
|
|
|
return new RequestQueueMemoryEntry();
|
|
}
|
|
|
|
export interface CreateStorageImplementationOptions {
|
|
persistStorage: boolean;
|
|
storeDirectory: string;
|
|
requestId: string;
|
|
}
|