~smoser/ubuntu/wily/maas/lp1474417

« back to all changes in this revision

Viewing changes to src/maasserver/management/commands/gc.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez, Dave Walker, Andres Rodriguez
  • Date: 2012-03-07 12:46:17 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120307124617-319lac0nc230srs9
Tags: 0.1+bzr232+dfsg-0ubuntu1
* New upstream snapshot.

[ Dave Walker ]
* debian/control:
  - Changed depends from psycopg2 to python-psycopg2 and dropped versioning.
    - LP: #937982 

[ Andres Rodriguez ]
* debian/maas.install: Install maas-import-isos and related files.
* Integrate squid3 as proxy solution:
  - debian/extras/squid.conf: Added
  - debian/control: Depend on squid3.
  - debian/maas.{postinst,postrm}: Handle installation/removal of custom
    squid config file.
* Split into different binary packages (maas,python-django-maas).
  - debian/maas.postinst: Handle the apache2 configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2012 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
"""Custom django command: garabge-collect."""
 
5
 
 
6
from __future__ import (
 
7
    print_function,
 
8
    unicode_literals,
 
9
    )
 
10
 
 
11
__metaclass__ = type
 
12
__all__ = [
 
13
    'Command',
 
14
    ]
 
15
 
 
16
 
 
17
from django.core.management.base import BaseCommand
 
18
from maasserver.models import FileStorage
 
19
 
 
20
 
 
21
class Command(BaseCommand):
 
22
    def handle(self, *args, **options):
 
23
        FileStorage.objects.collect_garbage()