예제 #1
0
 def allocate_disk(self, mailbox, value):
     data, __ = ResourceData.get_or_create(mailbox, self.resource)
     data.allocated = value
     data.save()
예제 #2
0
 def report_traffic(self, account, value):
     MonitorData.objects.create(monitor=FTPTrafficMonitor.get_name(), content_object=account.systemusers.get(), value=value)
     data, __ = ResourceData.get_or_create(account, self.resource)
     data.update()