def save_last_sync(self, ids, process):
        try:
            spec = {'_id': 'last_sync'}
            document = {'$set': {process: ids}}
            self.db.internal.update(spec, document, upsert=True)
        except Exception as e:
            raise DatabaseException(e)
def inc_c(self, ind):
        r, c = self.row_col(ind)
        c += 1
        if c == self.nc:
            c = 0
        if r == (self.nr - 1) and c == (self.nc - 1):
            c = 0
        return self.indx(r, c)