Meshroom/meshroom/core/submitter.py
Yann Lanthony 851ebf60ee [core] add support for external graph computation via 'Submitter' API
* defines a base class for Submitters
* add method in graph module to submit a graph computation to a Submitter
* add SimpleFarmSubmitter and generalize meshroom_submit binary
2017-11-17 19:17:36 +01:00

19 lines
560 B
Python

#!/usr/bin/env python
# coding:utf-8
from meshroom.common import BaseObject, Property
class BaseSubmitter(BaseObject):
def __init__(self, name, parent=None):
super(BaseSubmitter, self).__init__(parent)
self._name = name
def submit(self, nodes, edges, filepath):
""" Submit the given graph
Returns:
bool: whether the submission succeeded
"""
raise NotImplementedError("'submit' method must be implemented in subclasses")
name = Property(str, lambda self: self._name, constant=True)