kopia lustrzana https://github.com/OpenDroneMap/ODM
rodzic
a0f3850995
commit
126b74dfa4
|
@ -339,9 +339,13 @@ class Task:
|
||||||
# Add seed file
|
# Add seed file
|
||||||
images.append(seed_file)
|
images.append(seed_file)
|
||||||
|
|
||||||
|
class nonloc:
|
||||||
|
last_update = 0
|
||||||
|
|
||||||
def print_progress(percentage):
|
def print_progress(percentage):
|
||||||
if percentage % 10 == 0:
|
if (time.time() - nonloc.last_update >= 2) or int(percentage) == 100:
|
||||||
log.ODM_DEBUG("LRE: Upload of %s at [%s%%]" % (self, int(percentage)))
|
log.ODM_DEBUG("LRE: Upload of %s at [%s%%]" % (self, int(percentage)))
|
||||||
|
nonloc.last_update = time.time()
|
||||||
|
|
||||||
# Upload task
|
# Upload task
|
||||||
task = self.node.create_task(images,
|
task = self.node.create_task(images,
|
||||||
|
@ -363,6 +367,7 @@ class Task:
|
||||||
def monitor():
|
def monitor():
|
||||||
class nonloc:
|
class nonloc:
|
||||||
status_callback_calls = 0
|
status_callback_calls = 0
|
||||||
|
last_update = 0
|
||||||
|
|
||||||
def status_callback(info):
|
def status_callback(info):
|
||||||
# If a task switches from RUNNING to QUEUED, then we need to
|
# If a task switches from RUNNING to QUEUED, then we need to
|
||||||
|
@ -378,8 +383,9 @@ class Task:
|
||||||
nonloc.status_callback_calls = 0
|
nonloc.status_callback_calls = 0
|
||||||
try:
|
try:
|
||||||
def print_progress(percentage):
|
def print_progress(percentage):
|
||||||
if percentage % 10 == 0:
|
if (time.time() - nonloc.last_update >= 2) or int(percentage) == 100:
|
||||||
log.ODM_DEBUG("LRE: Download of %s at [%s%%]" % (self, int(percentage)))
|
log.ODM_DEBUG("LRE: Download of %s at [%s%%]" % (self, int(percentage)))
|
||||||
|
nonloc.last_update = time.time()
|
||||||
|
|
||||||
task.wait_for_completion(status_callback=status_callback)
|
task.wait_for_completion(status_callback=status_callback)
|
||||||
log.ODM_DEBUG("LRE: Downloading assets for %s" % self)
|
log.ODM_DEBUG("LRE: Downloading assets for %s" % self)
|
||||||
|
|
Ładowanie…
Reference in New Issue