summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-07-24 23:38:48 -0400
committerDonald Stufft <donald@stufft.io>2013-07-24 23:38:48 -0400
commit063ff638817f3732d088f1794a4dfc3ac15e7dfb (patch)
tree7574756478efc36354fc9a52b42d1e8ba273f0ff
parenta871f3beae1a53e808b7cd671b719c7f50e6a57f (diff)
downloaddecorator-063ff638817f3732d088f1794a4dfc3ac15e7dfb.tar.gz
Be smarter about what we queue
-rw-r--r--store.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/store.py b/store.py
index 9fa8e9e..8d0c79e 100644
--- a/store.py
+++ b/store.py
@@ -2313,8 +2313,11 @@ class Store:
tags = ["pkg~%s" % pkg if pkg is not None else "simple-index"
for pkg in self._changed_packages]
- # Enqueue the purge
- self.enqueue(tasks.purge_fastly_tags,
+ # We only need to bother to enqueue a task if we have something
+ # to purge
+ if tags:
+ # Enqueue the purge
+ self.enqueue(tasks.purge_fastly_tags,
self.config.fastly_api_domain,
self.config.fastly_api_key,
self.config.fastly_service_id,