forked from Cutlery/immich
rename scan to check
This commit is contained in:
parent
d7a78e5f25
commit
fa3a70a2ad
@ -611,13 +611,13 @@ export class LibraryService extends EventEmitter {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleQueueOfflineScan(job: IEntityJob): Promise<boolean> {
|
async handleQueueOnlineStatusCheck(job: IEntityJob): Promise<boolean> {
|
||||||
this.logger.log(`Checking for offline files in library: ${job.id}`);
|
this.logger.log(`Checking files for online/offline status in library: ${job.id}`);
|
||||||
const assetPagination = usePagination(JOBS_ASSET_PAGINATION_SIZE, (pagination) =>
|
const onlineAssets = usePagination(JOBS_ASSET_PAGINATION_SIZE, (pagination) =>
|
||||||
this.assetRepository.getWith(pagination, WithProperty.IS_ONLINE, job.id),
|
this.assetRepository.getWith(pagination, WithProperty.IS_ONLINE, job.id),
|
||||||
);
|
);
|
||||||
|
|
||||||
for await (const assets of assetPagination) {
|
for await (const assets of onlineAssets) {
|
||||||
this.logger.debug(`Checking if ${assets.length} assets are still online`);
|
this.logger.debug(`Checking if ${assets.length} assets are still online`);
|
||||||
await this.jobRepository.queueAll(
|
await this.jobRepository.queueAll(
|
||||||
assets.map((asset) => ({
|
assets.map((asset) => ({
|
||||||
|
@ -77,7 +77,7 @@ export class AppService {
|
|||||||
[JobName.LIBRARY_SCAN_ASSET]: (data) => this.libraryService.handleAssetRefresh(data),
|
[JobName.LIBRARY_SCAN_ASSET]: (data) => this.libraryService.handleAssetRefresh(data),
|
||||||
[JobName.LIBRARY_SCAN]: (data) => this.libraryService.handleQueueAssetRefresh(data),
|
[JobName.LIBRARY_SCAN]: (data) => this.libraryService.handleQueueAssetRefresh(data),
|
||||||
[JobName.LIBRARY_DELETE]: (data) => this.libraryService.handleDeleteLibrary(data),
|
[JobName.LIBRARY_DELETE]: (data) => this.libraryService.handleDeleteLibrary(data),
|
||||||
[JobName.LIBRARY_SCAN_OFFLINE]: (data) => this.libraryService.handleQueueOfflineScan(data),
|
[JobName.LIBRARY_SCAN_OFFLINE]: (data) => this.libraryService.handleQueueOnlineStatusCheck(data),
|
||||||
[JobName.LIBRARY_CHECK_IF_ASSET_ONLINE]: (data) => this.libraryService.handleAssetOnlineCheck(data),
|
[JobName.LIBRARY_CHECK_IF_ASSET_ONLINE]: (data) => this.libraryService.handleAssetOnlineCheck(data),
|
||||||
[JobName.LIBRARY_REMOVE_OFFLINE]: (data) => this.libraryService.handleOfflineRemoval(data),
|
[JobName.LIBRARY_REMOVE_OFFLINE]: (data) => this.libraryService.handleOfflineRemoval(data),
|
||||||
[JobName.LIBRARY_QUEUE_SCAN_ALL]: (data) => this.libraryService.handleQueueAllScan(data),
|
[JobName.LIBRARY_QUEUE_SCAN_ALL]: (data) => this.libraryService.handleQueueAllScan(data),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user