|
@ -37,4 +37,13 @@ public class DiMdbNotification extends DiActiveRecord { |
|
|
notification.status = "new"; |
|
|
notification.status = "new"; |
|
|
notification.save(); |
|
|
notification.save(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// notify error |
|
|
|
|
|
public static void taskError( DiTask task, String error ) { |
|
|
|
|
|
var notification = new DiMdbNotification(); |
|
|
|
|
|
notification.type = "task-error"; |
|
|
|
|
|
notification.data = error; |
|
|
|
|
|
notification.status = "new"; |
|
|
|
|
|
notification.save(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |