mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
Merge branch 'master' of github.com:hanzoai/bootnode
This commit is contained in:
@@ -96,30 +96,33 @@ async def update_nodes_lambda(date, zone, provider):
|
||||
# function to spin off thread
|
||||
async def update_nodes_loop():
|
||||
while True:
|
||||
date = datetime.datetime.utcnow()
|
||||
try:
|
||||
date = datetime.datetime.utcnow()
|
||||
|
||||
updates = []
|
||||
for provider in SUPPORTED_PROVIDERS:
|
||||
zones = SUPPORTED_ZONES[provider]
|
||||
updates = []
|
||||
for provider in SUPPORTED_PROVIDERS:
|
||||
zones = SUPPORTED_ZONES[provider]
|
||||
|
||||
for zone in zones:
|
||||
updates.append(update_nodes_lambda(date, zone, provider))
|
||||
for zone in zones:
|
||||
updates.append(update_nodes_lambda(date, zone, provider))
|
||||
|
||||
await asyncio.gather(*updates)
|
||||
await asyncio.gather(*updates)
|
||||
|
||||
updates_collection.update_one(
|
||||
{
|
||||
'name': 'nodes',
|
||||
},
|
||||
{
|
||||
'$set': {
|
||||
'date': date
|
||||
updates_collection.update_one(
|
||||
{
|
||||
'name': 'nodes',
|
||||
},
|
||||
},
|
||||
True
|
||||
)
|
||||
{
|
||||
'$set': {
|
||||
'date': date
|
||||
},
|
||||
},
|
||||
True
|
||||
)
|
||||
|
||||
await asyncio.sleep(1)
|
||||
await asyncio.sleep(1)
|
||||
except Exception as e:
|
||||
print('update_nodes_loop error' + str(e))
|
||||
|
||||
def update_nodes_thread():
|
||||
print('starting update thread')
|
||||
|
||||
+2
-2
@@ -25,10 +25,10 @@ users:
|
||||
user:
|
||||
auth-provider:
|
||||
config:
|
||||
access-token: ya29.Gl0JB66zST9RV9y7A91EmGRkieDrj4pmwNsZIA4KCVZo5ZViMOoomVKUvi2q8rcMyCojt45bo55JImDBaM8PxKj3qgqpzsmEX2lhm8W1eVgwFkeIR5CGryCSreaqu5Y
|
||||
access-token: ya29.Gl0ZB_FfCtyxOWCcfYgQ5IWIX3T2lsRa7jjtrBnU6Eq7fMDr_-PesAFtQnbrUTwkM8YirDdtvaYhLWsZPANNXYKi8-57gaXSXw9ENAj8-es1ynL4KlJUA_gZ6HnpMIg
|
||||
cmd-args: config config-helper --format=json
|
||||
cmd-path: /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud
|
||||
expiry: 2019-05-14T00:26:08Z
|
||||
expiry: 2019-05-29T22:35:06Z
|
||||
expiry-key: '{.credential.token_expiry}'
|
||||
token-key: '{.credential.access_token}'
|
||||
name: gcp
|
||||
|
||||
@@ -12,4 +12,3 @@ asyncio
|
||||
pymongo
|
||||
hypercorn
|
||||
requests_async
|
||||
nest_asyncio
|
||||
|
||||
Reference in New Issue
Block a user