Skip to content

Commit

Permalink
#51 Allow plugin jobs to update status after they are done
Browse files Browse the repository at this point in the history
  • Loading branch information
mmourafiq committed Mar 7, 2018
1 parent 9c6ee3c commit 98092cb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions polyaxon/plugins/models.py
Expand Up @@ -45,6 +45,17 @@ def resources(self):
def unique_name(self):
return self.__str__()

def _set_status(self, status_model, logger, status, message=None, details=None):
current_status = self.last_status
if status != current_status:
# Add new status to the job
status_model.objects.create(job=self,
status=status,
message=message,
details=details)
return True
return False


class TensorboardJob(PluginJobBase):
"""A model that represents the configuration for tensorboard job."""
Expand Down

0 comments on commit 98092cb

Please sign in to comment.