Смена портов
This commit is contained in:
parent
86ce4cea1c
commit
5e54904a1c
2
api.py
2
api.py
@ -330,4 +330,4 @@ def get_passwd(it: Get_passwd):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import uvicorn
|
import uvicorn
|
||||||
uvicorn.run(app, host='127.0.0.1', port=1111)
|
uvicorn.run(app, host='127.0.0.1', port=7001)
|
||||||
|
@ -5,7 +5,7 @@ from xxhash import xxh32
|
|||||||
from db import *
|
from db import *
|
||||||
|
|
||||||
global url_pre
|
global url_pre
|
||||||
url_pre = 'http://127.0.0.1:1111/'
|
url_pre = 'http://127.0.0.1:7001/'
|
||||||
|
|
||||||
def hash(text):
|
def hash(text):
|
||||||
text = str(text)
|
text = str(text)
|
||||||
|
2
ds.py
2
ds.py
@ -250,7 +250,7 @@ def transfer_callback_api(it: Transfer_callback_api):
|
|||||||
return 'Error'
|
return 'Error'
|
||||||
|
|
||||||
def run_api():
|
def run_api():
|
||||||
uvicorn.run(app, host='127.0.0.1', port=3333)
|
uvicorn.run(app, host='127.0.0.1', port=7003)
|
||||||
|
|
||||||
# Запускаем API для переводов
|
# Запускаем API для переводов
|
||||||
api = Thread(target=run_api)
|
api = Thread(target=run_api)
|
||||||
|
6
tg.py
6
tg.py
@ -190,9 +190,9 @@ def pay(message):
|
|||||||
ds_dst = get_ds(API_TOKEN, dst_id)
|
ds_dst = get_ds(API_TOKEN, dst_id)
|
||||||
src_nick = get_nick(API_TOKEN, src_id)
|
src_nick = get_nick(API_TOKEN, src_id)
|
||||||
if tg_dst != 'null':
|
if tg_dst != 'null':
|
||||||
transfer_callback('http://127.0.0.1:2222/', API_TOKEN, src_nick, nick, amount)
|
transfer_callback('http://127.0.0.1:7002/', API_TOKEN, src_nick, nick, amount)
|
||||||
elif ds_dst != 'null':
|
elif ds_dst != 'null':
|
||||||
transfer_callback('http://127.0.0.1:3333/', API_TOKEN, src_nick, nick, amount)
|
transfer_callback('http://127.0.0.1:7003/', API_TOKEN, src_nick, nick, amount)
|
||||||
else:
|
else:
|
||||||
bot.reply_to(message, '/pay ник количество')
|
bot.reply_to(message, '/pay ник количество')
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ def transfer_callback_api(it: Transfer_callback_api):
|
|||||||
return 'Error'
|
return 'Error'
|
||||||
|
|
||||||
def run_api():
|
def run_api():
|
||||||
uvicorn.run(app, host='127.0.0.1', port=2222)
|
uvicorn.run(app, host='127.0.0.1', port=7002)
|
||||||
|
|
||||||
# Запускаем API для переводов
|
# Запускаем API для переводов
|
||||||
api = Thread(target=run_api)
|
api = Thread(target=run_api)
|
||||||
|
Loading…
Reference in New Issue
Block a user