mirror of
https://github.com/sprockets/sprockets.mixins.metrics.git
synced 2024-11-21 19:28:34 +00:00
examples: is_future is in concurrent not gen.
This commit is contained in:
parent
2d29c8cda7
commit
7339f80408
2 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@ import os
|
|||
import signal
|
||||
|
||||
from sprockets.mixins import metrics
|
||||
from tornado import gen, ioloop, web
|
||||
from tornado import concurrent, gen, ioloop, web
|
||||
|
||||
|
||||
class SimpleHandler(metrics.InfluxDBMixin, web.RequestHandler):
|
||||
|
@ -35,7 +35,7 @@ class SimpleHandler(metrics.InfluxDBMixin, web.RequestHandler):
|
|||
@gen.coroutine
|
||||
def prepare(self):
|
||||
maybe_future = super(SimpleHandler, self).prepare()
|
||||
if gen.is_future(maybe_future):
|
||||
if concurrent.is_future(maybe_future):
|
||||
yield maybe_future
|
||||
|
||||
if 'Correlation-ID' in self.request.headers:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import signal
|
||||
|
||||
from sprockets.mixins import metrics
|
||||
from tornado import gen, ioloop, web
|
||||
from tornado import concurrent, gen, ioloop, web
|
||||
|
||||
|
||||
class SimpleHandler(metrics.StatsdMixin, web.RequestHandler):
|
||||
|
@ -17,7 +17,7 @@ class SimpleHandler(metrics.StatsdMixin, web.RequestHandler):
|
|||
@gen.coroutine
|
||||
def prepare(self):
|
||||
maybe_future = super(SimpleHandler, self).prepare()
|
||||
if gen.is_future(maybe_future):
|
||||
if concurrent.is_future(maybe_future):
|
||||
yield maybe_future
|
||||
|
||||
if 'Correlation-ID' in self.request.headers:
|
||||
|
|
Loading…
Reference in a new issue