Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(35)  |  Call(0)  |  Derive(0)  |  Import(35)
This simple decorator is attached to a handler to indicate to the
Router.deliver() method that it does NOT maintain state or care about it.
This is how you create a handler that processes all messages matching the
given format+captures in a @route.

Another way to think about a @stateless handler is that it is a passthrough
handler that does its processing and then passes the results on to others.

Stateless handlers are NOT guaranteed to run before the handler with state.

        def stateless(func):
    """
    This simple decorator is attached to a handler to indicate to the
    Router.deliver() method that it does NOT maintain state or care about it.
    This is how you create a handler that processes all messages matching the
    given format+captures in a @route.

    Another way to think about a @stateless handler is that it is a passthrough
    handler that does its processing and then passes the results on to others.

    Stateless handlers are NOT guaranteed to run before the handler with state.
    """
    if has_lamson_settings(func):
        assert not lamson_setting(func, 'format'), "You must use @stateless AFTER @route or @route_like."
    
    attach_lamson_settings(func)
    func._lamson_settings['stateless'] = True

    return func
        


src/l/a/lamson-1.3.4/examples/librelist/app/handlers/admin.py   lamson(Download)
from email.utils import parseaddr
from config.settings import relay, SPAM, CONFIRM
import logging
from lamson import view, queue
from lamson.routing import route, stateless, route_like, state_key_generator

src/l/a/lamson-HEAD/examples/librelist/app/handlers/admin.py   lamson(Download)
from email.utils import parseaddr
from config.settings import relay, SPAM, CONFIRM
import logging
from lamson import view, queue
from lamson.routing import route, stateless, route_like, state_key_generator

src/s/a/salmon-mail-1/examples/librelist/app/handlers/admin.py   salmon-mail(Download)
from email.utils import parseaddr
from config.settings import relay, SPAM, CONFIRM
import logging
from lamson import view, queue
from lamson.routing import route, stateless, route_like, state_key_generator

src/l/a/lamson-1.3.4/lamson/data/prototype/app/handlers/sample.py   lamson(Download)
import logging
from lamson.routing import route, route_like, stateless
from config.settings import relay
from lamson import view
 

src/l/a/lamson-HEAD/lamson/data/prototype/app/handlers/sample.py   lamson(Download)
import logging
from lamson.routing import route, route_like, stateless
from config.settings import relay
from lamson import view
 

src/d/i/discourse-HEAD/mailserver/app/handlers/sample.py   discourse(Download)
# This file is now disabled via config/boot.py
 
import logging
from lamson.routing import route, route_like, stateless
from config.settings import relay

src/p/y/python-emails-HEAD/emails/testsuite/lamsondebuggingsmtpinstance/app/handlers/sample.py   python-emails(Download)
import logging
from lamson.routing import route, route_like, stateless
from config.settings import relay
from lamson import view
 

src/l/a/lamson-1.3.4/examples/osb/app/handlers/post.py   lamson(Download)
from app.model import post
from email.utils import parseaddr
from config.settings import relay, CONFIRM
from lamson import view, queue
from lamson.routing import route, stateless

src/l/a/lamson-1.3.4/examples/osb/app/handlers/index.py   lamson(Download)
from __future__ import with_statement
from email.utils import parseaddr
from lamson import view, queue
from lamson.routing import route, stateless
import logging

src/l/a/lamson-1.3.4/examples/osb/app/handlers/comment.py   lamson(Download)
from app.model import post, comment
from email.utils import parseaddr
from config.settings import relay, SPAM, CONFIRM
from lamson import view, queue
from lamson.routing import route, stateless

  1 | 2 | 3 | 4  Next