Renamed variable name
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
fb514c21d6
commit
4dd591e447
|
@ -105,7 +105,7 @@ module.exports = Self => {
|
|||
|
||||
const startIndex = (entryName.length - 10);
|
||||
const endIndex = (entryName.length - 4);
|
||||
const dateStr = entryName.substring(startIndex, endIndex);
|
||||
const dateString = entryName.substring(startIndex, endIndex);
|
||||
const lastUpdated = new Date();
|
||||
|
||||
// Format string date to a date object
|
||||
|
@ -115,9 +115,9 @@ module.exports = Self => {
|
|||
updated.setHours(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
lastUpdated.setFullYear(`20${dateStr.substring(4, 6)}`);
|
||||
lastUpdated.setMonth(parseInt(dateStr.substring(2, 4)) - 1);
|
||||
lastUpdated.setDate(dateStr.substring(0, 2));
|
||||
lastUpdated.setFullYear(`20${dateString.substring(4, 6)}`);
|
||||
lastUpdated.setMonth(parseInt(dateString.substring(2, 4)) - 1);
|
||||
lastUpdated.setDate(dateString.substring(0, 2));
|
||||
lastUpdated.setHours(0, 0, 0, 0);
|
||||
|
||||
if (updated && lastUpdated <= updated) {
|
||||
|
@ -127,7 +127,7 @@ module.exports = Self => {
|
|||
|
||||
console.log('Dumping data...');
|
||||
const templatePath = path.join(__dirname, `./sql/${toTable}.sql`);
|
||||
const ff = fs.readFileSync(templatePath, 'utf8');
|
||||
const sqlTemplate = fs.readFileSync(templatePath, 'utf8');
|
||||
|
||||
const rawPath = path.join(paths.tempDir, entryName);
|
||||
|
||||
|
@ -136,7 +136,7 @@ module.exports = Self => {
|
|||
const options = {transaction: tx};
|
||||
|
||||
await Self.rawSql(`DELETE FROM edi.${toTable}`, null, options);
|
||||
await Self.rawSql(ff, [rawPath], options);
|
||||
await Self.rawSql(sqlTemplate, [rawPath], options);
|
||||
await Self.rawSql(`
|
||||
UPDATE edi.fileConfig
|
||||
SET updated = ?
|
||||
|
|
Loading…
Reference in New Issue