Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Timestamp checks #87

Merged
merged 10 commits into from
Jun 28, 2024

Conversation

aro-lew
Copy link

@aro-lew aro-lew commented Apr 30, 2024

If the JSON has a Timestamp value you can check the age/youth with --key_time.

@martialblog martialblog self-assigned this Apr 30, 2024
@martialblog
Copy link
Collaborator

Hi, thanks for the PR.

Could you give some context on/reasoning for the new functionality?

There should also be some examples added to the README and the code could use some testing. Check out the existing tests on how to implement those.

@aro-lew
Copy link
Author

aro-lew commented May 8, 2024

So I have an application with an HTTP JSON API. The application has two cron jobs which should run every hour. I can check the status of the last run and I have a Timestamp when the cron job last ran. Status checks work great with this check, but the Timestamp of the last run doesn't. So I implemented a check for the age of the Timestamp. (I also added checks for the opposite - how recent the Timestamp is and also how far in the future...)

Thank you for the response. Sorry for my late reply. I will add examples to the README and will add some testing. I hope it won't take me a long time.

@aro-lew
Copy link
Author

aro-lew commented May 17, 2024

I added some tests and wrote some information + examples to the README.

@martialblog could you please review this PR again?

@martialblog
Copy link
Collaborator

Thanks for the work. I will have a look at it.

@martialblog martialblog changed the base branch from master to release-2-3-0 June 28, 2024 12:38
@martialblog martialblog added this to the v2.3.0 milestone Jun 28, 2024
@martialblog martialblog merged commit b920a65 into drewkerrigan:release-2-3-0 Jun 28, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants