def handle(self, *args, **options): groups = options.get('groups', '1') thread_group_list = groups.split(',') tm = ThreadManager(1, thread_group_list) tm.start() reactor.run()