|
@@ -20,12 +20,9 @@ type FilePath struct {
|
|
type Document struct {
|
|
type Document struct {
|
|
gorm.Model
|
|
gorm.Model
|
|
|
|
|
|
- Name string
|
|
|
|
- SurveyUrl string
|
|
|
|
- ReferencePath string
|
|
|
|
- TemplatePath string
|
|
|
|
|
|
+ Name string
|
|
|
|
|
|
- Files []*FilePath
|
|
|
|
|
|
+ Jobs []*Job
|
|
}
|
|
}
|
|
|
|
|
|
type DocumentForUpdate struct {
|
|
type DocumentForUpdate struct {
|
|
@@ -159,8 +156,11 @@ func GetDocumentExecute(args map[string]string) (interface{}, error) {
|
|
|
|
|
|
log.Println("Execution was triggered!")
|
|
log.Println("Execution was triggered!")
|
|
|
|
|
|
- done := make(chan bool, 1)
|
|
|
|
- log.Println("Start generator...")
|
|
|
|
|
|
+ job := new(Job)
|
|
|
|
+ jobCh := make(chan Job, 1)
|
|
|
|
+
|
|
|
|
+ log.Println("Sending JOB %d to generator...", job.ID)
|
|
|
|
+
|
|
go documents.Generators["list"].Run(done)
|
|
go documents.Generators["list"].Run(done)
|
|
<-done
|
|
<-done
|
|
log.Println("Generator was started...")
|
|
log.Println("Generator was started...")
|