2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-14 19:57:50 +00:00

Relocate to a module, bootstrap will be significantly smaller

This commit is contained in:
Jarrod Johnson 2013-07-19 10:11:14 -04:00
parent 1bb457168a
commit f31d7d1ac6
2 changed files with 32 additions and 12 deletions

View File

@ -1,12 +0,0 @@
# Copyright 2013 IBM Corporation
# All rights reserved
# This is the main application.
# It should check for existing UDP socket to negotiate socket listen takeover
# It will have three paths into it:
# -Unix domain socket
# -TLS socket
# -WSGI
# Additionally, it will be able to receive particular UDP packets to facilitate
# Things like heartbeating and discovery
# It also will optionally snoop SLP DA requests

32
confluent/main.py Normal file
View File

@ -0,0 +1,32 @@
# Copyright 2013 IBM Corporation
# All rights reserved
# This is the main application.
# It should check for existing UDP socket to negotiate socket listen takeover
# It will have three paths into it:
# -Unix domain socket
# -TLS socket
# -WSGI
# Additionally, it will be able to receive particular UDP packets to facilitate
# Things like heartbeating and discovery
# It also will optionally snoop SLP DA requests
import eventlet
from eventlet.green import socket
from eventlet import wsgi
import multiprocessing
import sys
import os
def _load_plugins():
# To know our plugins directory, we get the parent path of 'bin'
path=os.path.dirname(os.path.realpath(__file__))
plugindir = os.path.realpath(os.path.join(path,'..','plugins'))
sys.path.append(plugindir)
plugins = set()
#two passes, to avoid adding both py and pyc files
for plugin in os.listdir(plugindir):
plugin = os.path.splitext(plugin)[0]
plugins.add(plugin)
if __name__ == "__main__":