Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit f85e08ed authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix: refactoring

parent a8f68854
......@@ -122,19 +122,16 @@ program
if (!port) {
throw 'Port is required.';
}
sync(server, host, port, conf, to)
.then(function(){
return co(function *() {
try {
yield sync(server, host, port, conf, to);
logger.info('Sync finished.');
})
.catch(function(err){
err && console.error(err.stack || err.message);
})
.then(function(){
return ((server && server.disconnect()) || Q()).catch(() => null);
})
.then(function(){
process.exit();
});
} catch (err) {
logger.error(err.stack || err.message);
}
yield ((server && server.disconnect()) || Q()).catch(() => null);
process.exit();
});
}));
function sync(server, host, port, conf, to) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment