mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
reduced debug logging
This commit is contained in:
parent
6757b8b92c
commit
5e7eeef6e2
@ -34,7 +34,6 @@ class JobManager:
|
|||||||
del self._pri2jobId2job
|
del self._pri2jobId2job
|
||||||
|
|
||||||
def add(self, job):
|
def add(self, job):
|
||||||
assert self.notify.debugCall()
|
|
||||||
pri = job.getPriority()
|
pri = job.getPriority()
|
||||||
jobId = job._getJobId()
|
jobId = job._getJobId()
|
||||||
# store the job in the main table
|
# store the job in the main table
|
||||||
@ -50,10 +49,9 @@ class JobManager:
|
|||||||
self._highestPriority = pri
|
self._highestPriority = pri
|
||||||
elif pri > self._highestPriority:
|
elif pri > self._highestPriority:
|
||||||
self._highestPriority = pri
|
self._highestPriority = pri
|
||||||
self.notify.debug('added job %s' % job.getJobName())
|
self.notify.debug('added job: %s' % job.getJobName())
|
||||||
|
|
||||||
def remove(self, job):
|
def remove(self, job):
|
||||||
assert self.notify.debugCall()
|
|
||||||
jobId = job._getJobId()
|
jobId = job._getJobId()
|
||||||
# look up the job's priority
|
# look up the job's priority
|
||||||
pri = self._jobId2pri.pop(jobId)
|
pri = self._jobId2pri.pop(jobId)
|
||||||
@ -74,7 +72,7 @@ class JobManager:
|
|||||||
else:
|
else:
|
||||||
taskMgr.remove(JobManager.TaskName)
|
taskMgr.remove(JobManager.TaskName)
|
||||||
self._highestPriority = 0
|
self._highestPriority = 0
|
||||||
self.notify.debug('removed job %s' % job.getJobName())
|
self.notify.debug('removed job: %s' % job.getJobName())
|
||||||
|
|
||||||
def finish(self, job):
|
def finish(self, job):
|
||||||
# run this job, right now, until it finishes
|
# run this job, right now, until it finishes
|
||||||
@ -115,7 +113,7 @@ class JobManager:
|
|||||||
|
|
||||||
def _process(self, task=None):
|
def _process(self, task=None):
|
||||||
if len(self._pri2jobId2job):
|
if len(self._pri2jobId2job):
|
||||||
assert self.notify.debugCall()
|
#assert self.notify.debugCall()
|
||||||
# figure out how long we can run
|
# figure out how long we can run
|
||||||
endT = globalClock.getRealTime() + (self._timeslice * .9)
|
endT = globalClock.getRealTime() + (self._timeslice * .9)
|
||||||
while True:
|
while True:
|
||||||
@ -145,7 +143,7 @@ class JobManager:
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
# we've run out of time
|
# we've run out of time
|
||||||
assert self.notify.debug('out of time: %s, %s' % (endT, globalClock.getRealTime()))
|
#assert self.notify.debug('timeslice end: %s, %s' % (endT, globalClock.getRealTime()))
|
||||||
job.suspend()
|
job.suspend()
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user