apache / openwhisk-package-alarms

Apache OpenWhisk package that can be used to create periodic, time-based alarms.
https://openwhisk.apache.org/
Apache License 2.0
24 stars 49 forks source link

strict option does not work #207

Closed KeonHee closed 4 years ago

KeonHee commented 4 years ago

I created alarm trigger with strict=true

wsk trigger create periodic28 \
    --feed /whisk.system/alarms/alarm \
    --param cron "*/1 * * * *" \
    --param trigger_payload "{\"name\":\"Odin\",\"place\":\"Asgard\"}" \
    -p strict true
ok: invoked /whisk.system/alarms/alarm with id deb8f8316cbd4be9b8f8316cbd7be9eb
ok: created trigger periodic28

If the strict = true is given, the cron job should run in 0 seconds, which is actually created with a value of 13 * / 1 * * * *.

[2020-03-06T04:09:25.695Z] [INFO] [worker1] [lambda-alarm-worker1-test-76cc465994-xsh7j] [alarmsTrigger] [setupFollow] got change for trigger xxxxxxxx/geonhui/periodic28
[2020-03-06T04:09:25.696Z] [INFO] [worker1] [lambda-alarm-worker1-test-76cc465994-xsh7j] [alarmsTrigger] [distributeCronAlarm] xxxxxxxx/geonhui/periodic28 is converted to "13 */1 * * * *"
[2020-03-06T04:09:25.696Z] [INFO] [worker1] [lambda-alarm-worker1-test-76cc465994-xsh7j] [alarmsTrigger] [scheduleCronAlarm] xxxxxxxx/geonhui/periodic28 starting cron job
[2020-03-06T04:09:25.697Z] [INFO] [worker1] [lambda-alarm-worker1-test-76cc465994-xsh7j] [alarmsTrigger] [setupFollow] xxxxxxxx/geonhui/periodic28 created successfully
style95 commented 4 years ago

Resolved by #208