Is sqlalchemy.url pointing to a valid database connection ?

Le 29/09/2017 à 04:17, Guohuang Chen a écrit :
> this is the example's development.ini,i have change the password to
> ****** in the sqlalchemy.url when paste on the group
> [app:main]
> use = egg:long_running_with_tm
>
> pyramid.reload_templates = true
> pyramid.debug_authorization = false
> pyramid.debug_notfound = false
> pyramid.debug_routematch = false
> pyramid.debug_templates = true
> pyramid.default_locale_name = en
> pyramid.includes = pyramid_debugtoolbar
>                    pyramid_tm
>                    pyramid_mako
>                    pyramid_celery
>
> sqlalchemy.url = postgresql://postgres:******@localhost/session
>
> [celery]
> broker_url = amqp://rainbird:password@localhost:5672//
> CELERY_DEFAULT_EXCHANGE = gds_zf
> BROKER_URL = amqp://dev:[email protected]:5672//test
> CELERY_TASK_SERIALIZER = 'json'
> CELERY_RESULT_SERIALIZER = 'json'
> CELERY_ACCEPT_CONTENT = ['json', 'application/json']
> CELERY_RESULT_BACKEND = amqp://dev:[email protected]:5672//test
> CELERY_IMPORTS = celerypythontest.celery_service
>
> [server:main]
> use = egg:pyramid#wsgiref
> host = 0.0.0.0
> port = 6543
>
> # Begin logging configuration
>
> [loggers]
> keys = root, long_running_with_tm, sqlalchemy
>
> [handlers]
> keys = console
>
> [formatters]
> keys = generic
>
> [logger_root]
> level = INFO
> handlers = console
>
> [logger_long_running_with_tm]
> level = DEBUG
> handlers =
> qualname = long_running_with_tm
>
> [logger_sqlalchemy]
> level = INFO
> handlers =
> qualname = sqlalchemy.engine
> # "level = INFO" logs SQL queries.
> # "level = DEBUG" logs SQL queries and results.
> # "level = WARN" logs neither.  (Recommended for production systems.)
>
> [handler_console]
> class = StreamHandler
> args = (sys.stderr,)
> level = NOTSET
> formatter = generic
>
> [formatter_generic]
> format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s]
> %(message)s
>
> # End logging configuration
>
>
> 在 2017年9月28日星期四 UTC+8下午11:29:14,tonthon写道:
>
>     Hi,
>     in your ini file, have your set the sqlalchemy.url to point to a
>     valid database connection ?
>
>     (pyramid_celery silently fails if that one is missing)            
>              
>
>
>     Le 27/09/2017 à 12:22, Guohuang Chen a écrit :
>>     i download the pyramid_celery from github.com <http://github.com>,
>>     and copy example long_running_with_tm   to my vitualenv path,and
>>     install it: pip install -e . and then
>>     just change celery broker_url in the development.ini ,i use
>>     windows and have no redis.
>>
>>     [celery]
>>     BROKER_URL = amqp://guest:guest@localhost:5672//
>>
>>     when i visit the page http://127.0.0.0.1:6543 ,and input some
>>     letters in the textfield, 
>>     and click add then the dos cmd window display the errors like this:
>>
>>     D:\pyramid64_py36\long_running_with_tm>celery worker -A
>>     pyramid_celery.celery_app --ini development.ini
>>
>>      -------------- celery@USER-VII7S3CG60 v4.1.0 (latentcall)
>>     ---- **** -----
>>     --- * ***  * -- Windows-7-6.1.7601-SP1 2017-09-27 16:31:11
>>     -- * - **** ---
>>     - ** ---------- [config]
>>     - ** ---------- .> app:         __main__:0x39d7c88
>>     - ** ---------- .> transport:   amqp://guest:**@localhost:5672//
>>     - ** ---------- .> results:     disabled://
>>     - *** --- * --- .> concurrency: 4 (prefork)
>>     -- ******* ---- .> task events: OFF (enable -E to monitor tasks
>>     in this worker)
>>     --- ***** -----
>>      -------------- [queues]
>>                     .> celery           exchange=celery(direct)
>>     key=celery
>>
>>
>>     [2017-09-27 16:36:17,930: ERROR/MainProcess] Received
>>     unregistered task of type 'long_running_with_tm.tasks.add_task'.
>>     The message has been ignored and discarded.
>>
>>     Did you remember to import the module containing this task?
>>     Or maybe you're using relative imports?
>>
>>     Please see
>>     http://docs.celeryq.org/en/latest/internals/protocol.html
>>     <http://docs.celeryq.org/en/latest/internals/protocol.html>
>>     for more information.
>>
>>     The full contents of the message body was:
>>     '[["fdfd"], {}, {"callbacks": null, "errbacks": null, "chain":
>>     null, "chord": nu
>>     ll}]' (83b)
>>     Traceback (most recent call last):
>>       File
>>     "c:\python36\lib\site-packages\celery\worker\consumer\consumer.py",
>>     line561, in on_task_received
>>         strategy = strategies[type_]
>>     KeyError: 'long_running_with_tm.tasks.add_task'
>>
>>     -- 
>>     You received this message because you are subscribed to the
>>     Google Groups "pylons-discuss" group.
>>     To unsubscribe from this group and stop receiving emails from it,
>>     send an email to [email protected] <javascript:>.
>>     To post to this group, send email to [email protected]
>>     <javascript:>.
>>     To view this discussion on the web visit
>>     
>> https://groups.google.com/d/msgid/pylons-discuss/e1455cc7-fec5-4a4a-a308-f6eac2393f2c%40googlegroups.com
>>     
>> <https://groups.google.com/d/msgid/pylons-discuss/e1455cc7-fec5-4a4a-a308-f6eac2393f2c%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>     For more options, visit https://groups.google.com/d/optout
>>     <https://groups.google.com/d/optout>.
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/9d167574-0879-4632-b1f0-2076841d0696%40googlegroups.com
> <https://groups.google.com/d/msgid/pylons-discuss/9d167574-0879-4632-b1f0-2076841d0696%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/890fd99d-90e5-6010-afe5-cb4b16552e0b%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to