openfaas / cron-connector

Invoke functions on a schedule.
MIT License
39 stars 10 forks source link

Update cron package to v3 #13

Closed viveksyngh closed 3 years ago

viveksyngh commented 3 years ago

This commit updates cron package version to v3 and uses github.com/robfig/cron/v3 instead of gopkg.in/robfig/cron.v2

Fixes #12

Description

Motivation and Context

How Has This Been Tested?

Tested on my local cluster with kind

 kubectl logs -n openfaas deploy/cron-connector -f
2021/01/30 14:46:53 Version: 66adc8a2f30d643c09accbab8ba032e4f1804c23   Commit: dev
2021/01/30 14:47:43 added function nodeinfo
2021/01/30 14:50:00 Executed function: nodeinfo
2021/01/30 14:50:00 connector-sdk got result: [200] cron-function => nodeinfo (104) bytes

 faas-cli store deploy nodeinfo --annotation schedule="*/0 * * * *" --annotation topic=cron-function
kubectl logs -n openfaas deploy/cron-connector -f
2021/01/30 14:46:53 Version: 66adc8a2f30d643c09accbab8ba032e4f1804c23   Commit: dev
2021/01/30 14:47:43 added function nodeinfo
2021/01/30 14:50:00 Executed function: nodeinfo
2021/01/30 14:50:00 connector-sdk got result: [200] cron-function => nodeinfo (104) bytes
2021/01/30 14:53:22 deleted function nodeinfo

Types of changes

Checklist:

derek[bot] commented 3 years ago

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide. Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.

alexellis commented 3 years ago

😢

How Has This Been Tested? (empty)

😲

Description (empty)

alexellis commented 3 years ago

Hey @viveksyngh, can you do a little testing on your PR over the weekend? It doesn't have to be extensive, just something to show it still works.

viveksyngh commented 3 years ago

@alexellis Updated with test results

alexellis commented 3 years ago

Thank you for that 👍