Skip to content

Commit a50158b

Browse files
author
Matthew Fisher
committed
fix(controller): remove application logs on delete
1 parent 01dc78a commit a50158b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

controller/api/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ def create(self, *args, **kwargs):
139139
def delete(self, *args, **kwargs):
140140
for c in self.container_set.all():
141141
c.destroy()
142+
# delete application logs stored by deis/logger
143+
path = os.path.join(settings.DEIS_LOG_DIR, self.id + '.log')
144+
if os.path.exists(path):
145+
os.remove(path)
142146
return super(App, self).delete(*args, **kwargs)
143147

144148
def deploy(self, release, initial=False):

0 commit comments

Comments
 (0)