def METHOD_NAME(self):
    with app.app_context():
        ids = [d["id"] for d in r.table("domains").pluck("id").run(db.conn)]
        for domain_id in ids:
            r.table("domains").get(domain_id).update(
                {"image": self.get_domain_stock_card(domain_id)}
            ).run(db.conn)