You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/03/16 21:17:08 UTC

[GitHub] [openwhisk-package-alarms] KeonHee commented on a change in pull request #208: Fixed strict option not working

KeonHee commented on a change in pull request #208: Fixed strict option not working
URL: https://github.com/apache/openwhisk-package-alarms/pull/208#discussion_r393315397
 
 

 ##########
 File path: provider/lib/cronAlarm.js
 ##########
 @@ -123,4 +124,24 @@ module.exports = function(logger, newTrigger) {
         return limit;
     }
 
+    function isStrict(strict) {
+        /**
+         * If the strict variable is not passed from alarmWebAction(User doesn't define strict value),
+         * then the ALARM_DELAY_DEFAULT_STRICT environment variable value is used.
+         */
+        if(strict === undefined || strict === null) {
+            return delayDefaultStrict;
+        }
+
+        /**
+         * "true"(string)   -> true
+         * "false"(string)  -> false
+         * "True"(string)   -> true
+         * "False"(string)  -> false
+         * true(boolean)    -> true
+         * false(boolean)   -> false
+         */
+        return String(strict).toLowerCase() === "true";
 
 Review comment:
   Updated user documents as your comment :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services