def _update_service_ref(service): if service.version != service_obj.SERVICE_VERSION: LOG.info('Updating service version for %(binary)s on ' '%(host)s from %(old)i to %(new)i', {'binary': service.binary, 'host': service.host, 'old': service.version, 'new': service_obj.SERVICE_VERSION}) service.version = service_obj.SERVICE_VERSION service.save()
def _update_service_ref(service): if service.version != service_obj.SERVICE_VERSION: LOG.info(_LI('Updating service version for %(binary)s on ' '%(host)s from %(old)i to %(new)i'), {'binary': service.binary, 'host': service.host, 'old': service.version, 'new': service_obj.SERVICE_VERSION}) service.version = service_obj.SERVICE_VERSION service.save()
def _update_service_ref(this_service, context): service = objects.Service.get_by_host_and_binary(context, this_service.host, this_service.binary) if not service: LOG.error(_LE('Unable to find a service record to update for ' '%(binary)s on %(host)s') % { 'binary': this_service.binary, 'host': this_service.host}) return if service.version != service_obj.SERVICE_VERSION: LOG.info(_LI('Updating service version for %(binary)s on ' '%(host)s from %(old)i to %(new)i') % dict( binary=this_service.binary, host=this_service.host, old=service.version, new=service_obj.SERVICE_VERSION)) service.version = service_obj.SERVICE_VERSION service.save()
def _update_service_ref(this_service, context): service = objects.Service.get_by_host_and_binary(context, this_service.host, this_service.binary) if not service: LOG.error(_LE('Unable to find a service record to update for ' '%(binary)s on %(host)s'), {'binary': this_service.binary, 'host': this_service.host}) return if service.version != service_obj.SERVICE_VERSION: LOG.info(_LI('Updating service version for %(binary)s on ' '%(host)s from %(old)i to %(new)i'), {'binary': this_service.binary, 'host': this_service.host, 'old': service.version, 'new': service_obj.SERVICE_VERSION}) service.version = service_obj.SERVICE_VERSION service.save()