220e3e7255
The previous event simulator simulated time by making all tasks that would have been launched as threads run in the same thread. That only worked to a point but didn't properly simulate more complex behaviors such as clustering. This new one handles things properly by still running tasks in eventlet's greenthreads but forcing them to only run one at a time. Change-Id: Ife834e8d55193da8416ba700e55e7b0c2496f532
27 lines
799 B
Python
27 lines
799 B
Python
# Copyright 2014 Rackspace Hosting
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
|
|
from trove.common import limits
|
|
|
|
|
|
ENABLED = False
|
|
|
|
|
|
class FakeRateLimitingMiddleware(limits.RateLimitingMiddleware):
|
|
|
|
def enabled(self):
|
|
return ENABLED
|