- Some packages
This commit is contained in:
parent
78088310dd
commit
0513652e0a
|
@ -2,7 +2,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/nodemailer": "^6.4.4",
|
"@types/nodemailer": "^6.4.4",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"mysqldump": "^3.2.0",
|
|
||||||
"nodemailer": "^6.6.3"
|
"nodemailer": "^6.6.3"
|
||||||
},
|
},
|
||||||
"name": "datahoard",
|
"name": "datahoard",
|
||||||
|
|
|
@ -102,8 +102,13 @@ export class DataWorker {
|
||||||
return _e(error);
|
return _e(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we have target
|
try {
|
||||||
|
// Dump the database
|
||||||
|
await this.dumpDatabase(conn, task);
|
||||||
|
} catch ( err ) {
|
||||||
|
conn.destroy();
|
||||||
|
return _e(err);
|
||||||
|
}
|
||||||
|
|
||||||
try { // Close the connection
|
try { // Close the connection
|
||||||
await new Promise<void>((re, er) => {
|
await new Promise<void>((re, er) => {
|
||||||
|
@ -119,4 +124,15 @@ export class DataWorker {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private dumpDatabase(conn : mysql.Connection, task: NodeConnection) {
|
||||||
|
return new Promise<void>((_r, _e) => {
|
||||||
|
|
||||||
|
// Get all of the databases from the connection
|
||||||
|
let databaseList: string[] = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Reference in New Issue