I hate print
This commit is contained in:
parent
511058205c
commit
2353bf7eb4
1 changed files with 3 additions and 9 deletions
|
@ -81,14 +81,12 @@ class RecAPI(Bottle):
|
||||||
def create(self):
|
def create(self):
|
||||||
req = dict(request.POST.allitems())
|
req = dict(request.POST.allitems())
|
||||||
ret = {}
|
ret = {}
|
||||||
print "Server:: Create request %s " % req
|
logger.debug("Server:: Create request %s " % req)
|
||||||
|
|
||||||
starttime = datetime.now()
|
starttime = datetime.now()
|
||||||
name = ""
|
name = ""
|
||||||
endtime = datetime.now()
|
endtime = datetime.now()
|
||||||
|
|
||||||
print "Starttime %s EndTime %s" %\
|
|
||||||
(starttime, endtime)
|
|
||||||
rec = Rec(name=name,
|
rec = Rec(name=name,
|
||||||
starttime=starttime,
|
starttime=starttime,
|
||||||
endtime=endtime)
|
endtime=endtime)
|
||||||
|
@ -162,7 +160,7 @@ class RecAPI(Bottle):
|
||||||
start=rec.starttime,
|
start=rec.starttime,
|
||||||
end=rec.endtime,
|
end=rec.endtime,
|
||||||
outfile=os.path.join(get_config()['AUDIO_OUTPUT'], rec.filename))
|
outfile=os.path.join(get_config()['AUDIO_OUTPUT'], rec.filename))
|
||||||
print "SUBMITTED: %d" % job_id
|
logger.debug("SUBMITTED: %d" % job_id)
|
||||||
return self.rec_msg("Aggiornamento completato!",
|
return self.rec_msg("Aggiornamento completato!",
|
||||||
job_id=job_id,
|
job_id=job_id,
|
||||||
result='/output/' + rec.filename,
|
result='/output/' + rec.filename,
|
||||||
|
@ -200,7 +198,7 @@ class RecAPI(Bottle):
|
||||||
def search(self, args=None):
|
def search(self, args=None):
|
||||||
req = dict()
|
req = dict()
|
||||||
req.update(request.GET.allitems())
|
req.update(request.GET.allitems())
|
||||||
print "Search request: %s" % (req)
|
logger.debug("Search request: %s" % (req))
|
||||||
|
|
||||||
values = self.db._search(**req)
|
values = self.db._search(**req)
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
@ -251,10 +249,6 @@ class RecServer:
|
||||||
self.db = RecDB(get_config()['DB_URI'])
|
self.db = RecDB(get_config()['DB_URI'])
|
||||||
|
|
||||||
def _route(self):
|
def _route(self):
|
||||||
### This is the API part of the app
|
|
||||||
# TODO: move to namespace /api/
|
|
||||||
# TODO: create a "sub-application"
|
|
||||||
|
|
||||||
## Static part of the site
|
## Static part of the site
|
||||||
self._app.route('/output/<filepath:path>',
|
self._app.route('/output/<filepath:path>',
|
||||||
callback=lambda filepath:
|
callback=lambda filepath:
|
||||||
|
|
Loading…
Reference in a new issue