Revision e1e37cf9 snf-pithos-app/pithos/api/management/commands/pithos-reconcile-commissions.py

b/snf-pithos-app/pithos/api/management/commands/pithos-reconcile-commissions.py
39 39

  
40 40
logger = logging.getLogger(__name__)
41 41

  
42
CLIENTKEY = 'pithos'
43

  
42 44
class Command(NoArgsCommand):
43 45
    help = "Display unresolved commissions and trigger their recovery"
44 46

  
45 47
    def handle_noargs(self, **options):
46 48
        b = get_backend()
47 49
        try:
48
            pending_commissions = b.quotaholder.get_pending_commissions()
50
            pending_commissions = b.quotaholder.get_pending_commissions(
51
                clientkey=CLIENTKEY
52
            )
49 53

  
50 54
            to_accept = b.quotaholder_serials.lookup(pending_commissions)
51 55
            self.stdout.write("Accept commissions: %s\n" %  to_accept)
52 56
            b.quotaholder.accept_commission(
53 57
                context     =   {},
54
                clientkey   =   'pithos',
58
                clientkey   =   CLIENTKEY,
55 59
                serials     =   to_accept
56 60
            )
57 61
            self.stdout.write("Delete serials: %s\n" %  to_accept)
......
61 65
            self.stdout.write("Reject commissions: %s\n" %  to_reject)
62 66
            b.quotaholder.reject_commission(
63 67
                context     =   {},
64
                clientkey   =   'pithos',
68
                clientkey   =   CLIENTKEY,
65 69
                serials     =   to_reject
66 70
            )
67 71

  

Also available in: Unified diff