def METHOD_NAME(self):  # pragma: no cover
    """Update exchange rates each time the server is started.
    Only runs *if*:
    a) Have not been updated recently (one day or less)
    b) The base exchange rate has been altered
    """
    try:
        from djmoney.contrib.exchange.models import ExchangeBackend
        from common.settings import currency_code_default
        from InvenTree.tasks import METHOD_NAME
    except AppRegistryNotReady:  # pragma: no cover
        pass
    base_currency = currency_code_default()
    update = False
    try:
        backend = ExchangeBackend.objects.filter(name='InvenTreeExchange')
        if backend.exists():
            backend = backend.first()
            last_update = backend.last_update
            if last_update is None:
                # Never been updated
                logger.info("Exchange backend has never been updated")
                update = True
            # Backend currency has changed?
            if base_currency != backend.base_currency:
                logger.info(f"Base currency changed from {backend.base_currency} to {base_currency}")
                update = True
    except (ExchangeBackend.DoesNotExist):
        logger.info("Exchange backend not found - updating")
        update = True
    except Exception:
        # Some other error - potentially the tables are not ready yet
        return
    if update:
        try:
            METHOD_NAME()
        except OperationalError:
            logger.warning("Could not update exchange rates - database not ready")
        except Exception as e:
            logger.error(f"Error updating exchange rates: {e} ({type(e)})")