Revision f46c95c4 snf-astakos-app/astakos/im/management/commands/quotaholder_sync.py
b/snf-astakos-app/astakos/im/management/commands/quotaholder_sync.py | ||
---|---|---|
37 | 37 |
from astakos.im.models import AstakosUser, Resource |
38 | 38 |
from astakos.im.endpoints.quotaholder import register_users, register_resources |
39 | 39 |
|
40 |
import logging |
|
41 |
logger = logging.getLogger(__name__) |
|
42 |
|
|
40 | 43 |
|
41 | 44 |
class Command(BaseCommand): |
42 | 45 |
help = "Send user information and resource quota in the Quotaholder" |
... | ... | |
44 | 47 |
def handle(self, *args, **options): |
45 | 48 |
try: |
46 | 49 |
register_resources(Resource.objects.all()) |
47 |
register_users(AstakosUser.objects.all())
|
|
50 |
register_users(AstakosUser.objects.filter(disturbed_quota=True))
|
|
48 | 51 |
except BaseException, e: |
49 |
raise CommandError("Bootstrap failed.") |
|
52 |
logger.exception(e) |
|
53 |
raise CommandError("Syncing failed.") |
Also available in: Unified diff