fix: specify type of let

Signed-off-by: Ana Luiza Ramalho dos Santos <analuiza@pop-os.localdomain>
This commit is contained in:
Ana Luiza Ramalho dos Santos
2023-01-16 13:57:39 -03:00
parent f0685193ef
commit 3e28855c02
@@ -53,13 +53,13 @@ export class PluginTaskSchedulerJanitor {
private async runOnce() {
const dbNull = this.knex.raw('null');
let tasks = [];
let tasks: Array<{ id: string }>;
const configClient = this.knex.client.config.client;
if (configClient.includes('sqlite3') || configClient.includes('mysql')) {
const now = await this.knex.select(this.knex.fn.now());
tasks = await this.knex<DbTasksRow>(DB_TASKS_TABLE)
.select('*')
.select('id')
.where('current_run_expires_at', '<', now);
await this.knex<DbTasksRow>(DB_TASKS_TABLE)
.where('current_run_expires_at', '<', now)