Skip to content

Commit

Permalink
Updated docs to show the new exception-based api.
Browse files Browse the repository at this point in the history
  • Loading branch information
KristianOellegaard committed Mar 28, 2013
1 parent 92c82ac commit a3b57e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ class DjangoDatabaseBackend(BaseHealthCheckBackend):
obj.title = "newtest"
obj.save()
obj.delete()
return HealthCheckStatusType.working
return True
except IntegrityError:
return HealthCheckStatusType.unexpected_result
raise ServiceReturnedUnexpectedResult("Integrity Error")
except DatabaseError:
return HealthCheckStatusType.unavailable
raise ServiceUnavailable("Database error")


```

Expand Down

0 comments on commit a3b57e8

Please sign in to comment.