Comments (3)
Okay, let the debug begins :)
First of all, you can enable debug output to see what exactly happens with cocaine. To do this, open cocaine-runtime's config (the same file you pointed with -c
or --config
option when cocaine-runtime started) and find logging configuration block. You need to rewrite it like this:
"loggers": {
"core" : {
"type" : "files",
"args" : {
"path" : "/dev/stdout",
"verbosity" : "debug"
}
}
}
Now, cocaine-runtime will print all log output to the stdout. Just run it: cocaine-runtime -c [CONFIG_FILE]
and post here what it prints when you execute service.enqueue('doIt', 'SomeMessage').get()
. Sometimes everything becomes clear at this point.
Also you can enable python-framework's debuging output by specifying it directly via python standard logging module:
import logging
log = logging.getLogger('cocaine')
log.setLevel(logging.DEBUG)
...
service.enqueue('doIt', 'SomeMessage').get()
By the way, when you are executing cocaine-tool call
command, it has the following signature: cocaine-tool call APP [METHOD] [ARGS]
. To see echo app methods just type cocaine-tool call echo
and you will see:
Service provides following API:
- info
- enqueue
See, there is no method 'doIt' - it is just an event name - the first parameter for enqueue
's method. So right command is: cocaine-tool call Echo enqueue "'doIt', 'SomeMessage'"
.
from cocaine-framework-python.
Thanks. Debug info was very helpful. I uploaded app with wrong path in manifest.json. I tried re-upload application and manifest, restarted, but it still use old valued, that was in manifest.json before i fixed it. Then i uploaded this app with new name - it worked like charm.
from cocaine-framework-python.
Apps are cached locally, that's why re-uploading doesn't change anything. If you use Process as your isolate plugin (which is the default), then simply remove the cache
section from the configuration file to disable app caching.
from cocaine-framework-python.
Related Issues (17)
- Serivice object initialization inside service crashes it HOT 6
- TypeError: unhashable type: 'bytearray' when launching example HOT 3
- My app's traceback HOT 3
- Cocaine logger and Unicode HOT 4
- cocaine.logging.Logger warn() method rename HOT 3
- Using msgpack HOT 7
- Asyncio branch: strange behaviour. HOT 4
- Wrong dependance in debian package HOT 4
- No cocaine.decorators HOT 2
- [http] Add a context manager for response object HOT 7
- importing decorators module causes RuntimeError if __context__ is not available HOT 2
- Application development with Cocaine
- Using cocaine-framework-python in Windows environment HOT 1
- Current example of usage cocaine app HOT 1
- Can not install framework into specified dir HOT 1
- Russian docs link is broken in README.md HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocaine-framework-python.