printf debug
This commit is contained in:
parent
9e06575a5d
commit
5b128371f1
|
@ -170,15 +170,17 @@ hub:
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
from tornado.httpserver import HTTPServer
|
from tornado.httpserver import HTTPServer
|
||||||
from tornado.ioloop import IOLoop
|
from tornado.ioloop import IOLoop
|
||||||
from tornado.log import app_log
|
|
||||||
from tornado.web import Application, RequestHandler, authenticated
|
from tornado.web import Application, RequestHandler, authenticated
|
||||||
from jupyterhub.services.auth import HubAuthenticated
|
from jupyterhub.services.auth import HubAuthenticated
|
||||||
|
def my_debug(s):
|
||||||
|
with open("/proc/1/fd/1", "a") as stdout:
|
||||||
|
print(s, file=stdout)
|
||||||
|
|
||||||
|
|
||||||
class RefreshHandler(HubAuthenticated, RequestHandler):
|
class RefreshHandler(HubAuthenticated, RequestHandler):
|
||||||
@authenticated
|
@authenticated
|
||||||
def get(self):
|
def get(self):
|
||||||
app_log.info(f"DEBUG: In refresh get {os.environ}")
|
my_debug(f"DEBUG: In refresh get")
|
||||||
# user_model = self.get_current_user()
|
# user_model = self.get_current_user()
|
||||||
user_model = {'helloooooo': 'hej'}
|
user_model = {'helloooooo': 'hej'}
|
||||||
self.set_header('content-type', 'application/json')
|
self.set_header('content-type', 'application/json')
|
||||||
|
@ -187,6 +189,7 @@ hub:
|
||||||
class PingHandler(RequestHandler):
|
class PingHandler(RequestHandler):
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
|
my_debug(f"DEBUG: In ping get")
|
||||||
self.set_header('content-type', 'application/json')
|
self.set_header('content-type', 'application/json')
|
||||||
self.write(json.dumps({'ping': 1}))
|
self.write(json.dumps({'ping': 1}))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue