This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ bin/pip freeze > requirements.txt | |
| $ cat requirements.txt | |
| gunicorn==0.13.2 | |
| pycurl==7.16.4 | |
| simplejson==2.2.1 | |
| tornado==2.0 | |
| wsgiref==0.1.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat >hello.py <<EOF | |
| import tornado.ioloop | |
| import tornado.web | |
| class MainHandler(tornado.web.RequestHandler): | |
| def get(self): | |
| self.write("Hello, world") | |
| application = tornado.web.Application([ | |
| (r"/", MainHandler), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat >Procfile <<EOF | |
| web: ./bin/gunicorn -k tornado --workers=4 --bind=0.0.0.0:$PORT hello | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat >.gitignore <<EOF | |
| bin/ | |
| include/ | |
| lib/ | |
| share/ | |
| src/ | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git init | |
| git add . | |
| git commit -m "Initial Commit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| heroku create --stack cedar | |
| git push heroku master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/fluent/engine.rb b/lib/fluent/engine.rb | |
| index 10e747c..6af8278 100644 | |
| --- a/lib/fluent/engine.rb | |
| +++ b/lib/fluent/engine.rb | |
| @@ -22,6 +22,7 @@ class EngineClass | |
| def initialize | |
| @matches = [] | |
| @sources = [] | |
| + @match_cache = {} | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/fluent/sender.py b/fluent/sender.py | |
| index 38580ef..202caaa 100644 | |
| --- a/fluent/sender.py | |
| +++ b/fluent/sender.py | |
| @@ -60,7 +60,7 @@ class FluentSender(object): | |
| self.socket = None | |
| def _make_packet(self, label, data): | |
| - tag = '.'.join(self.tag, label) | |
| + tag = '.'.join([self.tag, label]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| h = fluent.handler.FluentHandler('app.follow', port=self._port) | |
| logging.basicConfig(level=logging.INFO) | |
| l = logging.getLogger('fluent.test') | |
| l.addHandler(h) | |
| l.info({ | |
| 'from': 'userA', | |
| 'to': 'userB' | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <match hoge.tag> | |
| type copy | |
| <store> | |
| type mongo | |
| database backup | |
| connection hoge | |
| host localhost | |
| port 11111 |