Add timeout of 15 seconds for auto fetch button
This commit is contained in:
+1
-1
@@ -139,7 +139,7 @@ public class BookMetadataUpdater {
|
||||
.orElseGet(() -> categoryRepository.save(CategoryEntity.builder().name(categoryName).build()));
|
||||
|
||||
existingCategories.add(categoryEntity);
|
||||
` }
|
||||
}
|
||||
metadata.setCategories(existingCategories);
|
||||
} else if (!newMetadata.getCategories().isEmpty()) {
|
||||
Set<CategoryEntity> newCategoryEntities = new HashSet<>();
|
||||
|
||||
@@ -198,17 +198,17 @@ export class BookBrowserComponent implements OnInit, AfterViewInit {
|
||||
this.metadataMenuItems = [
|
||||
{
|
||||
label: 'Refresh Metadata',
|
||||
icon: 'pi pi-refresh',
|
||||
icon: 'pi pi-sync',
|
||||
command: () => this.updateMetadata()
|
||||
},
|
||||
{
|
||||
label: 'Edit Bulk Metadata',
|
||||
icon: 'pi pi-pencil',
|
||||
label: 'Bulk Metadata Editor',
|
||||
icon: 'pi pi-table',
|
||||
command: () => this.bulkEditMetadata()
|
||||
},
|
||||
{
|
||||
label: 'Edit Multi Book Metadata',
|
||||
icon: 'pi pi-pencil',
|
||||
label: 'Multi-Book Metadata Editor',
|
||||
icon: 'pi pi-clone',
|
||||
command: () => this.multiBookEditMetadata()
|
||||
}
|
||||
];
|
||||
|
||||
+4
@@ -477,6 +477,10 @@ export class MetadataEditorComponent implements OnInit {
|
||||
bookIds: [bookId],
|
||||
};
|
||||
this.bookService.autoRefreshMetadata(request).subscribe();
|
||||
setTimeout(() => {
|
||||
this.isAutoFetching = false;
|
||||
this.refreshingBookIds.delete(bookId);
|
||||
}, 15000);
|
||||
}
|
||||
|
||||
onNext() {
|
||||
|
||||
+3
@@ -170,6 +170,9 @@ export class MetadataViewerComponent implements OnInit, OnChanges {
|
||||
bookIds: [bookId],
|
||||
};
|
||||
this.bookService.autoRefreshMetadata(request).subscribe();
|
||||
setTimeout(() => {
|
||||
this.isAutoFetching = false;
|
||||
}, 15000);
|
||||
}
|
||||
|
||||
quickSend(bookId: number) {
|
||||
|
||||
Reference in New Issue
Block a user