This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-alarms.git


The following commit(s) were added to refs/heads/master by this push:
     new d3598dd  pin node version and other cleanup (#166)
d3598dd is described below

commit d3598dd4279b2675953eb3cdd3665694d254ac05
Author: Jason Peterson <[email protected]>
AuthorDate: Fri Oct 26 11:14:40 2018 -0400

    pin node version and other cleanup (#166)
---
 Dockerfile               | 21 ++-------------------
 action/alarmWebAction.js |  2 +-
 2 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 94e8cbf..0ce1fc9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,21 +1,4 @@
-FROM ubuntu:14.04
-
-ENV DEBIAN_FRONTEND noninteractive
-ENV NODE_SETUP_DOWNLOAD_SHA 
30084249bdd56119cb61be682a56829a11a4c94e21c5d005d326dedb66776104
-
-# Initial update and some basics.
-# This odd double update seems necessary to get curl to download without 404 
errors.
-RUN apt-get update --fix-missing && \
-  apt-get install -y wget && \
-  apt-get update && \
-  apt-get install -y curl && \
-  apt-get update && \
-  apt-get remove -y nodejs && \
-  curl -sL https://deb.nodesource.com/setup_8.x -o setup_8.x && \ 
-  echo "${NODE_SETUP_DOWNLOAD_SHA}  setup_8.x" | sha256sum -c - && \
-  cat setup_8.x | bash - && \
-  rm setup_8.x && \
-  apt-get install -y nodejs
+FROM node:8.12.0
 
 # only package.json
 ADD package.json /
@@ -26,4 +9,4 @@ ADD provider/. /alarmsTrigger/
 
 EXPOSE 8080
 
-CMD ["/bin/bash", "-c", "node /alarmsTrigger/app.js >> 
/logs/alarmsTrigger_logs.log 2>&1"]
+CMD ["/bin/bash", "-c", "node /alarmsTrigger/app.js"]
diff --git a/action/alarmWebAction.js b/action/alarmWebAction.js
index b5dd664..aae0259 100644
--- a/action/alarmWebAction.js
+++ b/action/alarmWebAction.js
@@ -40,7 +40,6 @@ function main(params) {
                 'dateChanged': Date.now()
             }
         };
-        Object.assign(newTrigger, triggerData);
 
         if (params.fireOnce) {
             if (!params.date) {
@@ -138,6 +137,7 @@ function main(params) {
             .then((worker) => {
                 console.log('trigger will be assigned to worker ' + worker);
                 newTrigger.worker = worker;
+                Object.assign(newTrigger, triggerData);
                 return db.createTrigger(triggerID, newTrigger);
             })
             .then(() => {

Reply via email to