chore: 更新.gitignore并添加新文件
在.gitignore中添加对*.png、*.log、*-lock.json、*.woff2文件的忽略规则,并新增OFL.txt文件。同时,添加vue.svg图标文件以支持前端展示。更新多个TypeScript文件以优化代码格式和增强可读性。
This commit is contained in:
@@ -12,7 +12,7 @@ export class CrawlerController {
|
||||
getStatus() {
|
||||
return {
|
||||
isCrawling: this.isCrawling,
|
||||
crawlingSources: Array.from(this.crawlingSources)
|
||||
crawlingSources: Array.from(this.crawlingSources),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ export class CrawlerController {
|
||||
if (this.isCrawling) {
|
||||
return { message: 'Crawl is already running' };
|
||||
}
|
||||
|
||||
|
||||
this.isCrawling = true;
|
||||
|
||||
|
||||
// We don't await this because we want it to run in the background
|
||||
// and return immediately, or we can await if we want to user to wait.
|
||||
// Given the requirement "Immediate Crawl", usually implies triggering it.
|
||||
@@ -45,9 +45,9 @@ export class CrawlerController {
|
||||
if (this.crawlingSources.has(sourceName)) {
|
||||
return { message: `Source ${sourceName} is already being crawled` };
|
||||
}
|
||||
|
||||
|
||||
this.crawlingSources.add(sourceName);
|
||||
|
||||
|
||||
try {
|
||||
const result = await this.crawlerService.crawlSingleSource(sourceName);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user