dead code

This commit is contained in:
Ben
2026-05-07 23:52:56 -04:00
parent 327be48ade
commit 2d6d2afacb
-26
View File
@@ -162,32 +162,6 @@ export class StratumV1JobsService {
return this.blocks[jobTemplateId]; return this.blocks[jobTemplateId];
} }
public cleanup(clearJobs: boolean, now: number = Date.now()) {
if (clearJobs) {
this.blocks = {};
this.jobs = {};
return;
}
let templatesDeleted = 0;
let jobsDeleted = 0;
for (const templateId in this.blocks) {
if (now - this.blocks[templateId].blockData.creation > (1000 * 60 * 5)) {
delete this.blocks[templateId];
templatesDeleted++;
}
}
for (const jobId in this.jobs) {
if (now - this.jobs[jobId].creation > (1000 * 60 * 5)) {
delete this.jobs[jobId];
jobsDeleted++;
}
}
//console.log(`Deleted ${templatesDeleted} templates and ${jobsDeleted} jobs.`)
}
public addJob(job: MiningJob) { public addJob(job: MiningJob) {
this.jobs[job.jobId] = job; this.jobs[job.jobId] = job;
this.latestJobId++; this.latestJobId++;