Esempio n. 1
0
    def __init__(self, domain, with_progress=True, debug=False):
        from corehq.apps.tzmigration.planning import DiffDB
        assert should_use_sql_backend(domain)

        self.with_progress = with_progress
        self.debug = debug
        self.domain = domain
        db_filepath = get_diff_db_filepath(domain)
        self.diff_db = DiffDB.init(db_filepath)

        self.errors_with_normal_doc_type = []
    def __init__(self, domain, with_progress=True, debug=False):
        from corehq.apps.tzmigration.planning import DiffDB
        self._assert_no_migration_restrictions(domain)
        self.with_progress = with_progress
        self.debug = debug
        self.domain = domain
        db_filepath = get_diff_db_filepath(domain)
        self.diff_db = DiffDB.init(db_filepath)

        self.errors_with_normal_doc_type = []
        self.forms_that_touch_cases_without_actions = set()
Esempio n. 3
0
    def __init__(self, domain, with_progress=True, debug=False, run_timestamp=None):
        from corehq.apps.tzmigration.planning import DiffDB
        self._assert_no_migration_restrictions(domain)
        self.with_progress = with_progress
        self.debug = debug
        self.domain = domain
        self.run_timestamp = run_timestamp or int(time())
        db_filepath = get_diff_db_filepath(domain)
        self.diff_db = DiffDB.init(db_filepath)

        self.errors_with_normal_doc_type = []
        self.forms_that_touch_cases_without_actions = set()
Esempio n. 4
0
    def __init__(self, domain, with_progress=True, debug=False):
        from corehq.apps.tzmigration.planning import DiffDB
        assert should_use_sql_backend(domain)

        self.with_progress = with_progress
        self.debug = debug
        self.domain = domain
        db_filepath = get_diff_db_filepath(domain)
        self.diff_db = DiffDB.init(db_filepath)

        self.errors_with_normal_doc_type = []
        self.forms_that_touch_cases_without_actions = set()
    def __init__(self, domain, with_progress=True, debug=False):
        from corehq.apps.tzmigration.planning import DiffDB
        assert should_use_sql_backend(domain)
        assert not COUCH_SQL_MIGRATION_BLACKLIST.enabled(domain)

        self.with_progress = with_progress
        self.debug = debug
        self.domain = domain
        db_filepath = get_diff_db_filepath(domain)
        self.diff_db = DiffDB.init(db_filepath)

        self.errors_with_normal_doc_type = []
        self.forms_that_touch_cases_without_actions = set()
    def __init__(self, domain, with_progress=True, debug=False, run_timestamp=None):
        from corehq.apps.tzmigration.planning import DiffDB
        self._check_for_migration_restrictions(domain)
        self.with_progress = with_progress
        self.debug = debug
        self.domain = domain
        self.run_timestamp = run_timestamp or int(time())
        db_filepath = get_diff_db_filepath(domain)
        self.diff_db = DiffDB.init(db_filepath)
        if debug:
            assert log.level <= logging.DEBUG, log.level
            logging.root.setLevel(logging.DEBUG)
            for handler in logging.root.handlers:
                if handler.name in ["file", "console"]:
                    handler.setLevel(logging.DEBUG)

        self.errors_with_normal_doc_type = []
        self.forms_that_touch_cases_without_actions = set()
Esempio n. 7
0
    def __init__(self, domain, with_progress=True, debug=False, run_timestamp=None):
        from corehq.apps.tzmigration.planning import DiffDB
        self._check_for_migration_restrictions(domain)
        self.with_progress = with_progress
        self.debug = debug
        self.domain = domain
        self.run_timestamp = run_timestamp or int(time())
        db_filepath = get_diff_db_filepath(domain)
        self.diff_db = DiffDB.init(db_filepath)
        if debug:
            assert log.level <= logging.DEBUG, log.level
            logging.root.setLevel(logging.DEBUG)
            for handler in logging.root.handlers:
                if handler.name in ["file", "console"]:
                    handler.setLevel(logging.DEBUG)

        self.errors_with_normal_doc_type = []
        self.forms_that_touch_cases_without_actions = set()
def get_diff_db(domain):
    from corehq.apps.tzmigration.planning import DiffDB

    db_filepath = get_diff_db_filepath(domain)
    return DiffDB.open(db_filepath)
Esempio n. 9
0
def get_diff_db(domain):
    from corehq.apps.tzmigration.planning import DiffDB

    db_filepath = get_diff_db_filepath(domain)
    return DiffDB.open(db_filepath)