-
Notifications
You must be signed in to change notification settings - Fork 0
/
teste.py
32 lines (22 loc) · 792 Bytes
/
teste.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import schedule
import time
#import psycopg2.extras
#import sys, os
from Naked.toolshed.shell import execute_rb, muterun_rb
#connection = psycopg2.connect("dbname=dados user=postgres password=123 host=localhost")
#c = connection.cursor()
def validarIPPaises():
"""arq = open('./DIY-Firewall/flags/paises.flag', 'w')
c.execute("SELECT * FROM validarIPPaises")
c.copy_to(arq, "validarippaises", sep=' ', columns=("flag",))
arq.close()
print("Arquivo TXT gerado")"""
execute_rb('./DIY-Firewall/lib/paises.rb')
print("Rodou o RB")
print("Felippe fez uma alteração")
print("Zabiroba fez uma alteração")
print("Bengalinho fez uma alteração")
schedule.every(10).seconds.do(validarIPPaises)
while 1:
schedule.run_pending()
time.sleep(1)