mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Update live services count when service is counted
If we change our mind and decide whether a service should/should not be counted in the list of live services then we should also drop the cache which stores the count of how many live services there are.
This commit is contained in:
@@ -114,6 +114,13 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
go_live_at=str(datetime.utcnow()) if live else None
|
||||
)
|
||||
|
||||
@cache.delete('live-service-and-organisation-counts')
|
||||
def update_count_as_live(self, service_id, count_as_live):
|
||||
return self.update_service(
|
||||
service_id,
|
||||
count_as_live=count_as_live,
|
||||
)
|
||||
|
||||
# This method is not cached because it calls through to one which is
|
||||
def update_service_with_properties(self, service_id, properties):
|
||||
return self.update_service(service_id, **properties)
|
||||
|
||||
Reference in New Issue
Block a user