How to use the pyodm.types.TaskStatus.QUEUED function in pyodm

To help you get started, we’ve selected a few pyodm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenDroneMap / WebODM / nodeodm / status_codes.py View on Github external
from pyodm.types import TaskStatus
QUEUED = TaskStatus.QUEUED.value
RUNNING = TaskStatus.RUNNING.value
FAILED = TaskStatus.FAILED.value
COMPLETED = TaskStatus.COMPLETED.value
CANCELED = TaskStatus.CANCELED.value
github OpenDroneMap / ODM / opendm / remote.py View on Github external
with open(error_log_path, 'w') as f:
                            f.write('\n'.join(output_lines) + '\n')

                        msg = "(%s) failed with task output: %s\nFull log saved at %s" % (task.uuid, "\n".join(output_lines[-10:]), error_log_path)
                        done(exceptions.TaskFailedError(msg))
                    except:
                        log.ODM_WARNING("LRE: Could not retrieve task output for %s (%s)" % (self, task.uuid))
                        done(e)
                except Exception as e:
                    done(e)

            # Launch monitor thread and return
            t = threading.Thread(target=monitor)
            self.params['threads'].append(t)
            t.start()
        elif info.status == TaskStatus.QUEUED:
            raise NodeTaskLimitReachedException("Task limit reached")
        else:
            raise Exception("Could not send task to node, task status is %s" % str(info.status))