progress removing onionr.py

This commit is contained in:
Kevin Froman 2019-08-04 23:08:56 -05:00
parent 2f9c1de062
commit 705962e9e7
12 changed files with 26 additions and 110 deletions

View file

@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
import base64, os
import base64, os, time
import flask
from gevent.pywsgi import WSGIServer
from onionrutils import epoch
@ -40,6 +40,7 @@ class PrivateAPI:
This initialization defines all of the API entry points and handlers for the endpoints and errors
This also saves the used host (random localhost IP address) to the data folder in host.txt
'''
time.sleep(0.3)
self.config = config
self.serializer = serializeddata.SerializedData()
self.startTime = epoch.get_epoch()

View file

@ -38,6 +38,7 @@ class PublicAPI:
The new client api server, isolated from the public api
'''
def __init__(self):
time.sleep(1)
app = flask.Flask('PublicAPI')
app.config['MAX_CONTENT_LENGTH'] = 5 * 1024 * 1024
self.i2pEnabled = config.get('i2p.host', False)