worker-automate-hub 0.4.428__tar.gz → 0.4.429__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/PKG-INFO +1 -1
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/pyproject.toml +1 -1
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/conexao_rdp.py +19 -19
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/README.md +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/worker.py +0 -0
@@ -26,16 +26,16 @@ class RDPConnection:
|
|
26
26
|
|
27
27
|
async def verificar_conexao(self) -> bool:
|
28
28
|
sistema_operacional = platform.system().lower()
|
29
|
-
|
29
|
+
console.print(f"Sistema operacional detectado: {sistema_operacional}")
|
30
30
|
if sistema_operacional == "windows":
|
31
31
|
comando_ping = ["ping", "-n", "1", "-w", "1000", self.ip]
|
32
32
|
else:
|
33
33
|
comando_ping = ["ping", "-c", "1", "-W", "1", self.ip]
|
34
|
-
|
34
|
+
console.print(f"Executando comando de ping: {' '.join(comando_ping)}")
|
35
35
|
try:
|
36
36
|
resposta_ping = subprocess.run(comando_ping, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
37
37
|
ping_alcancado = resposta_ping.returncode == 0
|
38
|
-
|
38
|
+
console.print(f"Ping {'sucesso' if ping_alcancado else 'falhou'}")
|
39
39
|
except Exception as e:
|
40
40
|
logger.error(f"Erro ao executar ping: {e}")
|
41
41
|
ping_alcancado = False
|
@@ -44,10 +44,10 @@ class RDPConnection:
|
|
44
44
|
try:
|
45
45
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
46
46
|
sock.settimeout(10)
|
47
|
-
|
47
|
+
console.print(f"Verificando porta 3389 em {self.ip}")
|
48
48
|
resposta_porta = sock.connect_ex((self.ip, 3389))
|
49
49
|
porta_aberta = resposta_porta == 0
|
50
|
-
|
50
|
+
console.print(f"Porta 3389 {'aberta' if porta_aberta else 'fechada'}")
|
51
51
|
except Exception as e:
|
52
52
|
logger.error(f"Erro ao verificar a porta RDP: {e}")
|
53
53
|
porta_aberta = False
|
@@ -69,10 +69,10 @@ class RDPConnection:
|
|
69
69
|
for titulo in janelas_rdp:
|
70
70
|
janela = gw.getWindowsWithTitle(titulo)[0]
|
71
71
|
if not janela:
|
72
|
-
print(f"Erro ao localizar a janela: {titulo}")
|
72
|
+
console.print(f"Erro ao localizar a janela: {titulo}")
|
73
73
|
continue
|
74
74
|
|
75
|
-
print(f"Processando janela: {titulo}")
|
75
|
+
console.print(f"Processando janela: {titulo}")
|
76
76
|
|
77
77
|
# Obtém as coordenadas da janela
|
78
78
|
x, y = janela.left, janela.top
|
@@ -90,19 +90,19 @@ class RDPConnection:
|
|
90
90
|
pyautogui.hotkey("enter")
|
91
91
|
|
92
92
|
except Exception as e:
|
93
|
-
print(f"Erro ao interagir com a janela {titulo}: {e}")
|
93
|
+
console.print(f"Erro ao interagir com a janela {titulo}: {e}")
|
94
94
|
|
95
95
|
async def conectar(self):
|
96
|
-
|
96
|
+
console.print(f"Iniciando cliente RDP para {self.ip}")
|
97
97
|
try:
|
98
98
|
pyautogui.hotkey("win", "d")
|
99
99
|
await worker_sleep(5) # Tempo para garantir que todas as janelas sejam minimizadas
|
100
|
-
|
100
|
+
console.print("Todas as janelas minimizadas com sucesso.")
|
101
101
|
|
102
102
|
subprocess.Popen(["mstsc", f"/v:{self.ip}"], close_fds=True, start_new_session=True)
|
103
103
|
await worker_sleep(10) # Tempo aumentado para garantir abertura
|
104
104
|
|
105
|
-
|
105
|
+
console.print("Procurando janela 'Conexão de Área de Trabalho Remota'")
|
106
106
|
windows = gw.getWindowsWithTitle("Conexão de Área de Trabalho Remota")
|
107
107
|
if not windows:
|
108
108
|
logger.warning("Tentando encontrar janela com título em inglês 'Remote Desktop Connection'")
|
@@ -113,7 +113,7 @@ class RDPConnection:
|
|
113
113
|
return False
|
114
114
|
|
115
115
|
rdp_window = windows[0]
|
116
|
-
|
116
|
+
console.print(f"Janela '{rdp_window.title}' encontrada. Focando na janela.")
|
117
117
|
|
118
118
|
# Restaurar janela se estiver minimizada
|
119
119
|
if rdp_window.isMinimized:
|
@@ -126,7 +126,7 @@ class RDPConnection:
|
|
126
126
|
new_height = screen_height // 2
|
127
127
|
rdp_window.resizeTo(new_width, new_height)
|
128
128
|
rdp_window.moveTo(screen_width // 4, screen_height // 4)
|
129
|
-
|
129
|
+
console.print(f"Janela redimensionada para {new_width}x{new_height}.")
|
130
130
|
|
131
131
|
rdp_window.activate()
|
132
132
|
await worker_sleep(5) # Tempo extra para garantir que a janela está ativa
|
@@ -144,24 +144,24 @@ class RDPConnection:
|
|
144
144
|
edit_field = dialog.child_window(auto_id="EditField_1", control_type="Edit")
|
145
145
|
|
146
146
|
if edit_field.exists():
|
147
|
-
|
147
|
+
console.print("Inserindo usuário.")
|
148
148
|
pyautogui.write(self.user, interval=0.1)
|
149
149
|
pyautogui.press("tab")
|
150
150
|
await worker_sleep(5)
|
151
151
|
except:
|
152
152
|
pass
|
153
153
|
|
154
|
-
|
154
|
+
console.print("Inserindo senha.")
|
155
155
|
pyautogui.write(self.password, interval=0.1)
|
156
156
|
pyautogui.press("enter")
|
157
157
|
await worker_sleep(5)
|
158
158
|
pyautogui.press("left")
|
159
159
|
await worker_sleep(5)
|
160
160
|
pyautogui.press("enter")
|
161
|
-
|
161
|
+
console.print("Credenciais inseridas.")
|
162
162
|
await worker_sleep(5) # Tempo para conexão ser concluída
|
163
163
|
|
164
|
-
|
164
|
+
console.print("Conexão RDP ativa. Mantendo o script em execução.")
|
165
165
|
return True
|
166
166
|
except Exception as e:
|
167
167
|
logger.error(f"Erro ao tentar conectar via RDP: {e}")
|
@@ -169,7 +169,7 @@ class RDPConnection:
|
|
169
169
|
|
170
170
|
async def conexao_rdp(task: RpaProcessoRdpDTO) -> RpaRetornoProcessoDTO:
|
171
171
|
try:
|
172
|
-
|
172
|
+
console.print("Iniciando processo de conexão RDP.")
|
173
173
|
rdp = RDPConnection(task)
|
174
174
|
conectado = await rdp.verificar_conexao()
|
175
175
|
if not conectado:
|
@@ -181,7 +181,7 @@ async def conexao_rdp(task: RpaProcessoRdpDTO) -> RpaRetornoProcessoDTO:
|
|
181
181
|
)
|
182
182
|
sucesso_conexao = await rdp.conectar()
|
183
183
|
if sucesso_conexao:
|
184
|
-
|
184
|
+
console.print("Processo de conexão RDP executado com sucesso.")
|
185
185
|
|
186
186
|
await rdp.clicar_no_titulo()
|
187
187
|
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/ahead_service.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/api/client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/config/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/config/settings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/repeat.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/retry.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/decorators/timeit.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/models/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/tasks/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/env.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/logger.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/toast.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/updater.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.428 → worker_automate_hub-0.4.429}/worker_automate_hub/utils/util.py
RENAMED
File without changes
|
File without changes
|
File without changes
|