Merge pull request #13 from piranha32/cpu_usage

Cpu usage
This commit is contained in:
TC² 2024-06-28 06:09:48 -04:00 committed by GitHub
commit 839b886c79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
__pycache__/
bulletins.db
venv/

View file

@ -18,6 +18,7 @@ from config_init import initialize_config, get_interface
from db_operations import initialize_database
from message_processing import on_receive
from pubsub import pub
import time
# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
@ -51,7 +52,8 @@ def main():
try:
while True:
pass
time.sleep(1)
except KeyboardInterrupt:
logging.info("Shutting down the server...")
interface.close()