diff --git a/coriolis/scheduler/rpc/client.py b/coriolis/scheduler/rpc/client.py index 61c009064..93729165e 100644 --- a/coriolis/scheduler/rpc/client.py +++ b/coriolis/scheduler/rpc/client.py @@ -1,18 +1,18 @@ # Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. +import oslo_messaging as messaging import random import time -import oslo_messaging as messaging -from oslo_config import cfg -from oslo_log import log as logging - from coriolis import constants from coriolis import exception from coriolis import rpc -from coriolis import utils from coriolis.tasks import factory as tasks_factory +from coriolis import utils + +from oslo_config import cfg +from oslo_log import log as logging VERSION = "1.0" @@ -163,7 +163,7 @@ def get_worker_service_for_task( worker_service['id'], task['id'], task['task_type'], origin_endpoint['id'], destination_endpoint['id']) return worker_service - except Exception as ex: + except Exception: LOG.warn( "Failed to schedule task with ID '%s' (attempt %d/%d). " "Waiting %d seconds and then retrying. Error was: %s", diff --git a/coriolis/scheduler/rpc/server.py b/coriolis/scheduler/rpc/server.py index 1456ff8c4..bec093e61 100644 --- a/coriolis/scheduler/rpc/server.py +++ b/coriolis/scheduler/rpc/server.py @@ -1,20 +1,15 @@ # Copyright 2020 Cloudbase Solutions Srl # All Rights Reserved. -import copy -import functools -import random -import uuid - from oslo_config import cfg from oslo_log import log as logging +from coriolis.conductor.rpc import client as rpc_conductor_client from coriolis import constants +from coriolis.db import api as db_api from coriolis import exception -from coriolis import utils -from coriolis.conductor.rpc import client as rpc_conductor_client from coriolis.scheduler.filters import trivial_filters -from coriolis.db import api as db_api +from coriolis import utils VERSION = "1.0"