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:
parent
1bb457168a
commit
f31d7d1ac6
12
confluent.py
12
confluent.py
@ -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
32
confluent/main.py
Normal 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__":
|
Loading…
x
Reference in New Issue
Block a user