diff --git a/confluent_server/bin/confluent b/confluent_server/bin/confluent index b5f56fe2..5eebfd75 100755 --- a/confluent_server/bin/confluent +++ b/confluent_server/bin/confluent @@ -15,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import asyncio import sys import os @@ -35,12 +34,12 @@ import confluent.main #try: import multiprocessing -async def main(): - await confluent.main.run(sys.argv) +def main(): + confluent.main.run(sys.argv) if __name__ == '__main__': #multiprocessing.freeze_support() #asyncio.get_event_loop().run_until_complete(main()) - asyncio.run(main()) + main() #gt = spawn_for_awaitable(confluent.main.run(sys.argv)) #gt.wait() #except: diff --git a/confluent_server/confluent/main.py b/confluent_server/confluent/main.py index facb326f..bd8fea6b 100644 --- a/confluent_server/confluent/main.py +++ b/confluent_server/confluent/main.py @@ -276,8 +276,7 @@ def migrate_db(): configmanager.init() -async def run(args): - asyncio.get_event_loop().set_debug(True) +def run(args): setlimits() try: configmanager.ConfigManager(None) @@ -314,6 +313,10 @@ async def run(args): _redirectoutput() if havefcntl: _updatepidfile() + asyncio.run(asyncrun()) + +async def asyncrun(): + asyncio.get_event_loop().set_debug(True) signal.signal(signal.SIGINT, terminate) signal.signal(signal.SIGTERM, terminate) atexit.register(doexit)