apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: tourshop-pool
namespace: metallb-system
spec:
addresses:
- 141.105.71.240-141.105.71.250
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: tourshop-l2
namespace: metallb-system
spec: {}apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: tourshop-pool
namespace: metallb-system
spec:
addresses:
- 141.105.71.146/32
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: tourshop-l2
namespace: metallb-system
spec:
ipAddressPools:
- tourshop-poolnginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:rw
- /etc/letsencrypt:/etc/letsencrypt:rw
depends_on:
- users-service
networks:
- users-service def callback_get(self, call):
# message = call.message
user_id = call.from_user.id
data = str(call.data).split(' ')
print(data)
menu = data[0]
if menu == 'MAIN_MY+VACANCIES_MENU':
# Логика
elif menu == 'MAIN_MY+VACANCIES_AT+VACANCY_MENU':
# Логика
elif menu == 'MAIN_MENU':
# Логика
elif menu == 'MAIN_MY+CHATS_MENU':
database = Database('users.db')
database.execute(f"SELECT * FROM users WHERE user_id={user_id}")
user = database.get_result()[0]
if user[3] == menu:
database.execute(f"UPDATE users SET menu='MAIN_MY+CHATS_AT+CHAT_MENU' WHERE user_id={user_id}")
chats_db = Database('chats.db')
markup = self.mc.create_back_button_markup()
if int(data[2]) == 1:
chats_db.execute(f"UPDATE chats SET employer_status=1 WHERE employer_id={user_id} AND id={data[1]}")
markup = self.mc.create_main_myChats_atChat_menu_markup()
elif int(data[2]) == 0:
chats_db.execute(f"UPDATE chats SET master_status=1 WHERE master_id={user_id} AND id={data[1]}")
markup = self.mc.create_back_button_markup()
self.send_message(user_id, "Перевожу в чат", reply_markup=markup)
self.do_send_chats_messages(user_id=user_id, chat_id=int(data[1]))
else:
self.send_message(user_id, """Вы должны находиться в меню "Мои чаты", чтобы использовать данную функцию""")while True:
try:
print('Bot started')
bot = Bot()
except Exception as e:
print('Bot crashed')
print(e)#определение положения мыши
import pyautogui as pa
last_x, last_y = pa.position()
while True:
x, y = pa.position()
if x != last_x or y != last_y:
pass # проверка, куда передвинулась мышка, действие, которое нужно сделать#нажатие клавиш на клавиатуре
import keyboard as kb
kb.press('кнопка') # вместо кнопки ставите кнопку, которую нужно нажать