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

Last update for Site model #281

Closed
jacekjaros opened this issue Aug 2, 2021 · 3 comments
Closed

Last update for Site model #281

jacekjaros opened this issue Aug 2, 2021 · 3 comments

Comments

@jacekjaros
Copy link

is this possible to add information of time when site was updated?

i use script to update ip addresses in list. i know that i can check http code after update however i need to expose information about last success update to other systems related to scantron however this not look as best approach.

my goal is to have easy way to get information if sites stop to be updated.

@derpadoo
Copy link
Contributor

derpadoo commented Aug 2, 2021

Hi @jacekjaros - appreciate the suggestion! This is definitely possible and should be quick to implement.

  1. Add created = models.DateTimeField(auto_now_add=True) to Site and any other relevant models

  2. Add last_updated = models.DateTimeField(auto_now=True, verbose_name="Last Updated") to Site and any other relevant models

  3. Add fields to API serializers (https://github.com/rackerlabs/scantron/blob/master/console/django_scantron/api/serializers.py)

  4. Update scantron_model_graph.png

@derpadoo
Copy link
Contributor

Hi @jacekjaros - just merged PR #282 into master.

Release notes: https://github.com/rackerlabs/scantron/releases/tag/v1.47.0

@derpadoo
Copy link
Contributor

I'll keep this open for a few days if you have any other questions or issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants