File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828from __future__ import unicode_literals
2929from future .builtins .disabled import * # noqa
3030from future .builtins import * # noqa
31+ from six import with_metaclass
3132
3233import logging
3334import time
35+ from abc import ABCMeta , abstractmethod
3436
3537import gevent
3638from gevent .event import Event
4244logger = logging .getLogger (__name__ )
4345
4446
45- class Executor (object ): # pylint: disable=R0921
47+ class Executor (with_metaclass ( ABCMeta , object ) ): # pylint: disable=R0921
4648
4749 """A class taking care of executing operations.
4850
@@ -170,6 +172,7 @@ def max_operations_per_batch(self):
170172 """
171173 return 0
172174
175+ @abstractmethod
173176 def execute (self , entry ):
174177 """Perform a single operation.
175178
@@ -183,7 +186,7 @@ def execute(self, entry):
183186 re-enqueue the item.
184187
185188 """
186- raise NotImplementedError ( "Please use a subclass." )
189+ pass
187190
188191
189192class TriggeredService (Service ):
You can’t perform that action at this time.
0 commit comments