Permalink
Browse files

Update the jobs with updated_at

  • Loading branch information...
thenoviceoof committed Mar 5, 2012
1 parent 8b88a69 commit 07b25b1c21c0ea4c9fb69ab6004af7d3a32cb23f
Showing with 4 additions and 2 deletions.
  1. +2 −0 flyer.py
  2. +1 −1 models.py
  3. +1 −1 templates/orgs.html
View
@@ -572,6 +572,7 @@ def get(self, job_id):
email.put()
if flyer.flyer:
if job.state == INIT:
+ job.updated_at = datetime.now()
job.state = DOWNLOADED
job.put()
# get the blobstore key, send it off
@@ -588,6 +589,7 @@ def get(self, job_id):
job = Job.get_by_key_name(job_id)
if job and job.state != DONE and job.active == True:
+ job.updated_at = datetime.now()
job.state = DONE
job.put()
# update the email
View
@@ -67,9 +67,9 @@ class Job(db.Model):
# reporting: init (0), downloaded (1), done (2), error (-1)
# however, error is never used?
state = db.IntegerProperty(default=0)
- last_updated = db.DateTimeProperty(auto_now_add=True)
# timestamps
created_at = db.DateTimeProperty(auto_now_add=True)
+ updated_at = db.DateTimeProperty(auto_now_add=True)
################################################################################
# Mappings
View
@@ -72,7 +72,7 @@ <h2>Make New Club</h2>
var data{{ flyer.id }} = [
{% for job in flyer.done_jobs %}
{"name": "{{ job.email.email }}",
- "update": new Date("{{ job.last_updated|date }}") },
+ "update": new Date("{{ job.updated_at|date }}") },
{% endfor %}
];
// bin the data

0 comments on commit 07b25b1

Please sign in to comment.