Beispiel #1
0
    def handle(self, *args, **options):
        if options['apps'] is not None:
            apps = options['apps'].split(",")
        else:
            apps = None

        if not options['no_input']:
            self.stdout.write('Dilla is going to spam your database. \
                    Do you wish to proceed? (Y/N)')
            confirm = sys.stdin.readline().replace('\n', '').upper()
            if not confirm == 'Y':
                self.stdout.write('Aborting.\n')
                sys.exit(1)

        d = Dilla(apps=apps, \
                cycles=int(options['cycles']), \
                use_coin=not options['use_coin'])

        apps, affected, filled, omitted = d.run()

        self.stdout.write("Dilla finished!\n\
        %d app(s) spammed %d row(s) affected, \
        %d field(s) filled, %d field(s) ommited.\nThank you!)" % \
                (apps, affected, filled, omitted)
                )
Beispiel #2
0
    def handle(self, *args, **options):
        if options['apps'] is not None:
            apps = options['apps'].split(",")
        else:
            apps = None

        if not options['no_input']:
            self.stdout.write('Dilla is going to spam your database. \
                    Do you wish to proceed? (Y/N)')
            confirm = sys.stdin.readline().replace('\n', '').upper()
            if not confirm == 'Y':
                self.stdout.write('Aborting.\n')
                sys.exit(1)

        d = Dilla(apps=apps, \
                cycles=int(options['cycles']), \
                use_coin=not options['use_coin'])

        apps, affected, filled, omitted = d.run()

        self.stdout.write("Dilla finished!\n\
        %d app(s) spammed %d row(s) affected, \
        %d field(s) filled, %d field(s) ommited.\nThank you!)"                                                               % \
                (apps, affected, filled, omitted)
                )