Clean directory
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-06-03 13:54:58 +02:00
parent bdb581db94
commit 5059f72ea5
1 changed files with 3 additions and 2 deletions

View File

@ -19,11 +19,12 @@ module.exports = Self => {
Self.updateData = async() => {
const models = Self.app.models;
await models.TempContainer.destroyContainer('edi');
const container = await models.TempContainer.container('edi');
const tempPath = path.join(container.client.root, container.name);
// Temporary file clean
await fs.rmdir(`${tempPath}/*`, {recursive: true});
const [ftpConfig] = await Self.rawSql('SELECT host, user, password FROM edi.ftpConfig');
console.debug(`Openning FTP connection to ${ftpConfig.host}...\n`);