'Publishes Deis platform state from the database to etcd.'

def handle(self, *args, **options):

    print('Publishing    DB    state    to    etcd...')
    for app in App.objects.all():
        app.save()
        app.config_set.latest().save()
    for model in (Key, Domain, Certificate):
        for obj in model.objects.all():
            obj.save()
    print('Done    Publishing    DB    state    to    etcd.')
