Skip to content

Commit

Permalink
feat: add python script template
Browse files Browse the repository at this point in the history
  • Loading branch information
Picred committed Apr 19, 2024
1 parent 2d1bad5 commit 4584b3b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 60 deletions.
28 changes: 28 additions & 0 deletions ingestion-manager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import asyncio
import time, socket

def testLogstash():
while True:
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('logstash', 5000))
sock.close()
print("[ingestion-manager]Logstash is ready!")

break
except:
print("[ingestion-manager]Logstash not ready")
time.sleep(5)
continue


def main() -> None:
testLogstash()



if __name__ == '__main__':
try:
asyncio.run(main())
except KeyboardInterrupt:
print("[ingestion-manager]Program exited")
60 changes: 0 additions & 60 deletions test.py

This file was deleted.

0 comments on commit 4584b3b

Please sign in to comment.