examples: is_future is in concurrent not gen.

This commit is contained in:
Dave Shawley 2016-01-29 09:25:50 -05:00
parent 2d29c8cda7
commit 7339f80408
2 changed files with 4 additions and 4 deletions

View file

@ -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:

View file

@ -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: