elasticsearch-mysql-sync
Advanced tools
Comparing version
{ | ||
"name": "elasticsearch-mysql-sync", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,2 +9,3 @@ "use strict" | ||
const _ = require("lodash") | ||
const moment = require("moment") | ||
@@ -19,4 +20,6 @@ class Syncer extends EsUtil { | ||
this.schedule = config.schedule | ||
this.$lastexecutionstart = config.initialParameter.lastexecutionstart || new Date() | ||
this.$lastexecutionend = config.initialParameter.lastexecutionend || new Date() | ||
this.$lastexecutionstart = config.initialParameter.lastexecutionstart || new Date(0) | ||
this.$lastexecutionend = config.initialParameter.lastexecutionend || new Date(0) | ||
this.$lastexecutionstartInSeconds = config.initialParameter.lastexecutionstartInSeconds || 0 | ||
this.$lastexecutionendInSeconds = config.initialParameter.lastexecutionendInSeconds || 0 | ||
this.$totalrows = config.initialParameter.totalrows || 0 | ||
@@ -74,2 +77,3 @@ } | ||
this.$lastexecutionstart = new Date() | ||
this.$lastexecutionstartInSeconds = moment().unix() | ||
const body = { | ||
@@ -118,2 +122,3 @@ settings: this.settings, | ||
this.$lastexecutionend = new Date() | ||
this.$lastexecutionendInSeconds = moment().unix() | ||
} catch (error) { | ||
@@ -120,0 +125,0 @@ console.log(error) |
6527
5.61%210
2.44%