mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-28 19:55:20 +08:00
small fixes
This commit is contained in:
@@ -47,9 +47,9 @@ def send_update():
|
||||
#-----------------------------------
|
||||
if __name__ == '__main__':
|
||||
|
||||
#key = 'u/awrightiv'
|
||||
#log.debug(get_server(key))
|
||||
key = 'u/goldmansachs'
|
||||
log.debug(get_server(key))
|
||||
#value = json.loads('{"next":"u/awright"}')
|
||||
#update_name(key,value)
|
||||
|
||||
send_update()
|
||||
#send_update()
|
||||
@@ -17,13 +17,13 @@ queue = db.queue
|
||||
from ast import literal_eval
|
||||
import json
|
||||
|
||||
from config import MONGODB_URI
|
||||
#from config import MONGODB_URI
|
||||
|
||||
#-----------------------------------
|
||||
from pymongo import MongoClient
|
||||
remote_client = MongoClient(MONGODB_URI)
|
||||
remote_db = remote_client.get_default_database()
|
||||
codes = remote_db.codes
|
||||
#from pymongo import MongoClient
|
||||
#remote_client = MongoClient(MONGODB_URI)
|
||||
#remote_db = remote_client.get_default_database()
|
||||
#codes = remote_db.codes
|
||||
|
||||
#-----------------------------------
|
||||
def format_key_value(key, name=None):
|
||||
@@ -59,7 +59,11 @@ def main_loop(key, name=None):
|
||||
if namecoind.check_registration(key):
|
||||
|
||||
profile = namecoind.name_show(key)
|
||||
profile = profile['value']
|
||||
try:
|
||||
profile = profile['value']
|
||||
except:
|
||||
pass
|
||||
|
||||
if 'status' in profile and profile['status'] == 'reserved':
|
||||
print "already reserved: " + key
|
||||
#update_name(key,value)
|
||||
|
||||
Reference in New Issue
Block a user