Giter Club home page Giter Club logo

Comments (3)

saschagottfried avatar saschagottfried commented on July 23, 2024

pyramid_celery.commands.CommandMixin is using pyramid.paster.bootstrap to load wsgi application from PasteDeploy config file. The current version does not pass through additional commandline arguments following config_uri to the bootstrap call.

That matters

Excerpt from docs
options Is passed to get_app for use as variable assignments like {'http_port': 8080} and then use %(http_port)s in the config file.

I changed a single line - the call to pyramid.paster.bootstrap

pyramid_celery.commands.init.py

from __future__ import absolute_import

import sys

from pyramid.paster import bootstrap
from celery.app import default_app


class CommandMixin(object):
    preload_options = ()

    def setup_app_from_commandline(self, argv):
        if len(argv) < 2:
            print >> sys.stderr, 'No configuration file specified.'
            sys.exit(1)
        bootstrap(config_uri=argv[1], options=argv[2:])
        self.app = default_app
        return argv[:1] + argv[2:]

from pyramid_celery.

sontek avatar sontek commented on July 23, 2024

The previous solution doesn't work anymore because we are deprecating the p* commands. I'm thinking the new api will be:

celery -A pyramid_celery.celery_app --ini-var database=postgres, user=sontek

I wanted to support multiple --ini-var calls but there is a bug in celery currently that breaks this. PR here:

celery/celery#2435

from pyramid_celery.

sontek avatar sontek commented on July 23, 2024

Added support for this in b946494

from pyramid_celery.

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.