update data-grouping-2d;
This commit is contained in:
parent
7f3ecde088
commit
b07cfd8cb5
|
@ -29,6 +29,13 @@ RUN echo "ServerName 127.0.0.1" >> /etc/apache2/apache2.conf \
|
|||
&& a2enconf adminer \
|
||||
&& sed -i 's/80/8080/' /etc/apache2/ports.conf
|
||||
|
||||
RUN \
|
||||
apt-get update \
|
||||
&& apt-get install -y sqlite3 \
|
||||
&& apt-get clean autoclean \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY --from=hub.cstcloud.cn/scalebox/base /usr/local/sbin/ /usr/local/sbin/
|
||||
RUN mkdir -p /work/.scalebox /app/bin && echo "PATH=/app/bin:\${PATH}" >> /root/.bashrc
|
||||
|
||||
|
|
|
@ -15,10 +15,8 @@ var (
|
|||
|
||||
logger *logrus.Logger
|
||||
|
||||
messageFile string
|
||||
datasetFile string
|
||||
sqliteFile string
|
||||
|
||||
datasetFile string
|
||||
workDir string
|
||||
datasetPrefix string
|
||||
)
|
||||
|
||||
|
@ -26,18 +24,16 @@ func init() {
|
|||
var err error
|
||||
logrus.SetReportCaller(true)
|
||||
|
||||
workDir := os.Getenv("WORD_DIR")
|
||||
workDir = os.Getenv("WORD_DIR")
|
||||
if workDir == "" {
|
||||
workDir = "/work"
|
||||
}
|
||||
messageFile = workDir + "/messages.txt"
|
||||
datasetFile = workDir + "/.scalebox/datasets.txt"
|
||||
sqliteFile = workDir + "/.scalebox/sqlite.db"
|
||||
|
||||
datasetPrefix = os.Getenv("DATASET_PREFIX")
|
||||
|
||||
// set database connection
|
||||
if db, err = sql.Open("sqlite3", sqliteFile); err != nil {
|
||||
if db, err = sql.Open("sqlite3", workDir+"/.scalebox/sqlite.db"); err != nil {
|
||||
logrus.Fatalln("Unable to open sqlite3 database:", err)
|
||||
}
|
||||
sqlTextFmt := `
|
||||
|
|
|
@ -33,6 +33,7 @@ func main() {
|
|||
logrus.Errorf("entity:%s\nentity format should be prefix,entity_text\n", ss[0])
|
||||
os.Exit(3)
|
||||
}
|
||||
|
||||
datasetID := ss[0]
|
||||
if datasetPrefix != "" {
|
||||
datasetID = datasetPrefix + ":" + datasetID
|
||||
|
@ -64,7 +65,7 @@ func main() {
|
|||
logrus.Printf("entity:%v\n", entity)
|
||||
|
||||
for _, txt := range dataset.getNewGroups(entity) {
|
||||
scalebox.AppendToFile(messageFile, dataset.SinkJob+","+txt)
|
||||
scalebox.AppendToFile(workDir+"/messages.txt", dataset.SinkJob+","+txt)
|
||||
}
|
||||
|
||||
os.Exit(code)
|
||||
|
|
Loading…
Reference in New Issue