wrap in main

This commit is contained in:
Malte Grosse 2024-06-30 10:57:32 +00:00
parent 56b128f5c4
commit 609ca76405
2 changed files with 130 additions and 127 deletions

View File

@ -6,6 +6,7 @@ import threading
import itertools import itertools
import os import os
import argparse import argparse
def main():
print("##### Init Ollama #####") print("##### Init Ollama #####")
# --- Global list to store running processes --- # --- Global list to store running processes ---
running_processes = [] running_processes = []
@ -166,3 +167,5 @@ else:
# Gracefully terminate running processes on script exit or error # Gracefully terminate running processes on script exit or error
terminate_processes() terminate_processes()
if __name__ == "__main__":
main()

View File

@ -10,7 +10,7 @@ setup(
], ],
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'ollama_start=ollama_launcher.launcher' 'ollama_start=ollama_launcher.launcher:main'
], ],
}, },
) )