added better logging
This commit is contained in:
parent
b4555e9845
commit
1762e418c0
3 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,9 @@ def reset_owners():
|
||||||
|
|
||||||
def get_owner(f):
|
def get_owner(f):
|
||||||
""" Get the owner id of the file 'f' """
|
""" Get the owner id of the file 'f' """
|
||||||
return owners[f] if f in owners else -1
|
o = owners[f] if f in owners else -1
|
||||||
|
log.info("Received owner for %s. Owner: %s" % (f, o))
|
||||||
|
return o
|
||||||
|
|
||||||
|
|
||||||
def add_file_owner(f,owner):
|
def add_file_owner(f,owner):
|
||||||
|
|
|
@ -52,8 +52,6 @@ class RequestSync(Loggable):
|
||||||
self.logger.info("ApiController.php probably crashed, we \
|
self.logger.info("ApiController.php probably crashed, we \
|
||||||
diagnose this from the fact that it did not return \
|
diagnose this from the fact that it did not return \
|
||||||
valid json")
|
valid json")
|
||||||
self.logger.info("Trying again after %f seconds" %
|
|
||||||
self.request_wait)
|
|
||||||
except Exception as e: self.unexpected_exception(e)
|
except Exception as e: self.unexpected_exception(e)
|
||||||
else: self.logger.info("Request was successful")
|
else: self.logger.info("Request was successful")
|
||||||
self.watcher.flag_done() # poor man's condition variable
|
self.watcher.flag_done() # poor man's condition variable
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import unittest
|
import unittest
|
||||||
import media.monitor.owners as owners
|
from media.monitor import owners
|
||||||
|
|
||||||
class TestMMP(unittest.TestCase):
|
class TestMMP(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue