GithubHelp home page GithubHelp logo

example gen.py not working about tornadio2 HOT 5 OPEN

mrjoes avatar mrjoes commented on August 17, 2024
example gen.py not working

from tornadio2.

Comments (5)

faxioman avatar faxioman commented on August 17, 2024

Why issue closed? I have the same problem ...

from tornadio2.

mrjoes avatar mrjoes commented on August 17, 2024

Because I can not reproduce it. Works without any problems on Tornado 2.4.1.

from tornadio2.

faxioman avatar faxioman commented on August 17, 2024

I see the Runner class of tornado 2.4.1 and has a new parameter in init:

def __init__(self, gen, deactivate_stack_context):

SyncRunner calls the super init in this way:

super(SyncRunner, self).__init__(gen)

I think this is the problem.

from tornadio2.

mrjoes avatar mrjoes commented on August 17, 2024

Ah, this is interoperability issue between engine and sync_engine. gen.py example works because it is using sync_engine.

Edit: If you don't care about executing actions in order, feel free to use standard tornado.gen.engine

from tornadio2.

faxioman avatar faxioman commented on August 17, 2024

I think i'm using sync_engine too.
In my class:

class MeteoDataSetAPI(SocketConnection):
    ...
    @gen.sync_engine
    def on_event(self, name, *args, **kwargs):
        return super(MeteoDataSetAPI, self).on_event(name, *args, **kwargs)

Is it right?

from tornadio2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.