Ejemplo n.º 1
0
 def ledger_processor(self):
     from corehq.form_processor.backends.couch.ledger import LedgerProcessorCouch
     from corehq.form_processor.backends.sql.ledger import LedgerProcessorSQL
     if self.use_sql_domain:
         return LedgerProcessorSQL(domain=self.domain)
     else:
         return LedgerProcessorCouch(domain=self.domain)
Ejemplo n.º 2
0
 def ledger_processor(self):
     from corehq.form_processor.backends.sql.ledger import LedgerProcessorSQL
     return LedgerProcessorSQL(domain=self.domain)
Ejemplo n.º 3
0
def rebuild_ledgers(ledgers_to_rebuild_by_domain, logger):
    for domain, ledger_ids in six.iteritems(ledgers_to_rebuild_by_domain):
        for ledger_id in ledger_ids:
            LedgerProcessorSQL.hard_rebuild_ledgers(domain,
                                                    **ledger_ids._asdict())
            logger.log('Ledger %s rebuilt' % ledger_id.as_id())
Ejemplo n.º 4
0
def rebuild_ledgers(ledgers_to_rebuild_by_domain, logger):
    for domain, ledger_ids in six.iteritems(ledgers_to_rebuild_by_domain):
        for ledger_id in ledger_ids:
            LedgerProcessorSQL.hard_rebuild_ledgers(domain, **ledger_ids._asdict())
            logger.log('Ledger %s rebuilt' % ledger_id.as_id())