mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-10-06 07:32:38 +02:00
Compare commits
4 Commits
deploy-009
...
deploy-010
Author | SHA1 | Date | |
---|---|---|---|
|
18e91269ab | ||
|
e315ca5758 | ||
|
3ceea17c1d | ||
|
b34527c1a3 |
@@ -267,7 +267,7 @@ public class CrawlerMain extends ProcessMainClass {
|
|||||||
// Start every task we currently can from the deferral list
|
// Start every task we currently can from the deferral list
|
||||||
deferredTasks.removeIf(task -> {
|
deferredTasks.removeIf(task -> {
|
||||||
if (task.canRun()) {
|
if (task.canRun()) {
|
||||||
if (pendingCrawlTasks.putIfAbsent(crawlSpec.domain(), task) != null) {
|
if (pendingCrawlTasks.putIfAbsent(task.domain, task) != null) {
|
||||||
return true; // task has already run, duplicate in crawl specs
|
return true; // task has already run, duplicate in crawl specs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,12 +280,23 @@ public class CrawlerMain extends ProcessMainClass {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Schedule any lingering tasks for immediate execution
|
|
||||||
for (var task : deferredTasks) {
|
|
||||||
if (pendingCrawlTasks.putIfAbsent(task.domain, task) != null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
|
// Schedule any lingering tasks for immediate execution until none exist
|
||||||
|
while (!deferredTasks.isEmpty()) {
|
||||||
|
deferredTasks.removeIf(task -> {
|
||||||
|
if (task.canRun()) {
|
||||||
|
if (pendingCrawlTasks.putIfAbsent(task.domain, task) != null) {
|
||||||
|
return true; // task has already run, duplicate in crawl specs
|
||||||
|
}
|
||||||
|
|
||||||
|
// This blocks the caller when the pool is full
|
||||||
pool.submitQuietly(task);
|
pool.submitQuietly(task);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
TimeUnit.MILLISECONDS.sleep(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info("Shutting down the pool, waiting for tasks to complete...");
|
logger.info("Shutting down the pool, waiting for tasks to complete...");
|
||||||
|
@@ -81,6 +81,7 @@ public class SearchFilters {
|
|||||||
),
|
),
|
||||||
List.of(
|
List.of(
|
||||||
new Filter("Vintage", "fa-clock-rotate-left", SearchProfile.VINTAGE, parameters),
|
new Filter("Vintage", "fa-clock-rotate-left", SearchProfile.VINTAGE, parameters),
|
||||||
|
new Filter("Small Web", "fa-minus", SearchProfile.SMALLWEB, parameters),
|
||||||
new Filter("Plain Text", "fa-file", SearchProfile.PLAIN_TEXT, parameters),
|
new Filter("Plain Text", "fa-file", SearchProfile.PLAIN_TEXT, parameters),
|
||||||
new Filter("Tilde", "fa-house", SearchProfile.TILDE, parameters)
|
new Filter("Tilde", "fa-house", SearchProfile.TILDE, parameters)
|
||||||
),
|
),
|
||||||
|
@@ -9,6 +9,14 @@
|
|||||||
nicotine: '#f8f8ee',
|
nicotine: '#f8f8ee',
|
||||||
margeblue: '#3e5f6f',
|
margeblue: '#3e5f6f',
|
||||||
liteblue: '#0066cc',
|
liteblue: '#0066cc',
|
||||||
|
},
|
||||||
|
screens: {
|
||||||
|
'coarsepointer': {
|
||||||
|
'raw': '(pointer: coarse)'
|
||||||
|
},
|
||||||
|
'finepointer': {
|
||||||
|
'raw': '(pointer: fine)'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
screens: {
|
screens: {
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
@template.serp.part.searchform(query = results.getParams().query(), profile = results.getProfile(), filters = results.getFilters())
|
@template.serp.part.searchform(query = results.getParams().query(), profile = results.getProfile(), filters = results.getFilters())
|
||||||
</div>
|
</div>
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
<button class="fixed bottom-10 right-5 sm:hidden text-sm bg-margeblue text-white p-4 rounded-xl active:text-slate-200" id="filter-button">
|
<button class="fixed bottom-10 right-5 finepointer:hidden md:hidden text-sm bg-margeblue text-white p-4 rounded-xl active:text-slate-200" id="filter-button">
|
||||||
<i class="fas fa-filter mr-3"></i>
|
<i class="fas fa-filter mr-3"></i>
|
||||||
Filters
|
Filters
|
||||||
</button>
|
</button>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
@param SearchFilters filters
|
@param SearchFilters filters
|
||||||
|
|
||||||
<aside class="md:w-64 py-4 shrink-0 hidden sm:block">
|
<aside class="md:w-64 py-4 shrink-0 hidden md:block finepointer:block">
|
||||||
<div class="space-y-6 sticky top-4">
|
<div class="space-y-6 sticky top-4">
|
||||||
<div class="bg-white dark:bg-gray-800 p-4 border dark:border-gray-600 border-gray-300">
|
<div class="bg-white dark:bg-gray-800 p-4 border dark:border-gray-600 border-gray-300">
|
||||||
<h2 class="font-medium mb-3 flex items-center font-serif hidden md:block">
|
<h2 class="font-medium mb-3 flex items-center font-serif hidden md:block">
|
||||||
|
@@ -9,6 +9,14 @@ module.exports = {
|
|||||||
nicotine: '#f8f8ee',
|
nicotine: '#f8f8ee',
|
||||||
margeblue: '#3e5f6f',
|
margeblue: '#3e5f6f',
|
||||||
liteblue: '#0066cc',
|
liteblue: '#0066cc',
|
||||||
|
},
|
||||||
|
screens: {
|
||||||
|
'coarsepointer': {
|
||||||
|
'raw': '(pointer: coarse)'
|
||||||
|
},
|
||||||
|
'finepointer': {
|
||||||
|
'raw': '(pointer: fine)'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
screens: {
|
screens: {
|
||||||
|
Reference in New Issue
Block a user