Generalize socketio sender from task and emit more data specific to the type of unified job sending the update

This commit is contained in:
Matthew Jones
2014-04-22 15:52:45 -04:00
parent 5904d2e1ee
commit 4810b9532d
5 changed files with 27 additions and 12 deletions

View File

@@ -48,7 +48,7 @@ class ProjectOptions(models.Model):
('hg', _('Mercurial')),
('svn', _('Subversion')),
]
class Meta:
abstract = True
@@ -346,6 +346,9 @@ class ProjectUpdate(UnifiedJob, ProjectOptions):
return True
return False
def socketio_emit_data(self):
return dict(project_id=self.project.id)
@property
def task_impact(self):
return 20