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
import getopt | |
import uuid | |
import sqlite3 | |
import sys | |
from datetime import datetime | |
import os | |
import time | |
import socket |
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
FROM python:3.4 | |
RUN pip install eventlet | |
COPY test.py /var/tmp/test.py | |
CMD [ "python", "/var/tmp/test.py" ] |
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
from nameko.rpc import rpc | |
class HelloService(object): | |
name = "hello" | |
@rpc | |
def hello(self, name): | |
return "Hello, {}!".format(name) |
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
machine: | |
python: | |
version: 3.4.3 | |
services: | |
- rabbitmq-server | |
environment: | |
IMAGE_TAG: ${CIRCLE_SHA1} | |
pre: | |
- sudo rabbitmq-plugins enable rabbitmq_management |
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
import eventlet | |
eventlet.monkey_patch() | |
def pytest_configure(config): | |
import logging | |
logging.basicConfig(level=logging.DEBUG) # or comment out this line, works fine |
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
*.pyc |
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
from flask import Flask, request | |
from nameko.standalone.rpc import ServiceRpcProxy | |
app = Flask(__name__) | |
@app.route('/') | |
def task_list(): | |
return """ | |
<html> |
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
[run] | |
branch = True | |
source = . |
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
from nameko.extensions import DependencyProvider | |
class Config(DependencyProvider): | |
def get_dependency(self, worker_ctx): | |
return self.container.config.copy() |
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
import sys | |
def foo(): | |
bar() | |
def bar(): | |
baz() |