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
def send_ready(reader, conn, count): | |
if (reader.total_ready_count + count) > reader.max_in_flight: | |
return | |
conn.send_ready(count) | |
conn.rdy_count = count | |
reader.total_ready_count += count |
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
{ | |
"max_rdy_count": 2500, | |
"version": "0.2.20-alpha" | |
} |
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
{ | |
"short_id": "app01", | |
"long_id": "app01.bitly.net", | |
"heartbeat_interval": 30000, | |
"feature_negotiation": true | |
} |
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
{ | |
"status_code": 200, | |
"status_txt": "OK", | |
"data": { | |
"channels": ["archive", "science", "metrics"], | |
"producers": [ | |
{ | |
"broadcast_address": "clicksapi01.routable.domain.net", | |
"hostname": "clicksapi01.domain.net", | |
"tcp_port": 4150, |
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
function j { | |
local project=$1 | |
cd `find ~/dev/src -type d -mindepth 3 -maxdepth 3 -name $project` | |
} |
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
const ( | |
ModeAll = iota | |
ModeRoundRobin | |
) | |
type Publisher interface { | |
Publish(string, []byte) error | |
} | |
type PublishHandler struct { |
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 nsq | |
buf = [] | |
def process_message(message): | |
global buf | |
message.enable_async() | |
buf.append(message) | |
if len(buf) >= 3: | |
for msg in buf: |
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 nsq | |
def task1(message): | |
print message | |
return True | |
def task2(message): | |
print message | |
return True |
NewerOlder