Skip to content
Snippets Groups Projects
Commit e84e48cc authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Transpilation no more passes

parent 4dbfcf3e
No related branches found
No related tags found
1 merge request!1245Migrate to NodeJS 9
......@@ -407,14 +407,14 @@ export class MetaDAL extends AbstractSQLite<DBMeta> {
'COMMIT;')
}
private async executeMigration(migration: any[], conf:ConfDTO) {
private async executeMigration(migration: (string|((conf:ConfDTO)=>void)), conf:ConfDTO) {
try {
if (typeof migration == "string") {
// Simple SQL script to pass
await this.exec(migration);
} else if (typeof migration == "function") {
} else {
// JS function to execute
await migration(conf);
......
......@@ -759,7 +759,7 @@ class P2PDownloader {
// Continue
return chosens;
}, []);
let candidates = await Promise.all(promises)
let candidates:any[] = await Promise.all(promises)
candidates.forEach((c:any) => {
c.tta = c.tta || 0; // By default we say a node is super slow to answer
c.ttas = c.ttas || []; // Memorize the answer delays
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment