automated terminal push

This commit is contained in:
Your Name
2025-02-12 14:58:39 -05:00
parent 6667c774c3
commit eb71aa4c48
39 changed files with 1 additions and 17 deletions

View File

@@ -0,0 +1,42 @@
import stomp
import time
import veneno
import fetcher
class MyListener(stomp.ConnectionListener):
def on_message(headers, message):
conn.ack(headers['message-id'])
print("** new message! **")
print(message)
fetcher.fetch(message.body)
def on_error(headers, message):
print('received an error "%s"' % message)
conn.ack(headers['message-id'])
conn = stomp.Connection([('osiris.yankee.valorantdigital.com', 61613)])
conn.set_listener('', MyListener())
conn.connect('admin', 'password', wait=True)
conn.subscribe('/queue/sully-gnome-urls', id=1, ack='client', headers={'activemq.prefetchSize': 10})
print("## notification > connected to JMS server")
while True:
pass
time.sleep(1)
conn.disconnect()