sync: save import_report into StaticDir
This commit is contained in:
parent
e6b1b932f4
commit
92ba880006
@ -130,6 +130,7 @@ func main() {
|
||||
if StaticDir, err = filepath.Abs(StaticDir); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
sync.DeepReportPath = path.Join(StaticDir, sync.DeepReportPath)
|
||||
if fic.FilesDir, err = filepath.Abs(fic.FilesDir); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
@ -12,6 +12,9 @@ import (
|
||||
"srs.epita.fr/fic-server/settings"
|
||||
)
|
||||
|
||||
// DeepReportPath stores the path to the report generated during full recursive import.
|
||||
var DeepReportPath = "full_import_report.json"
|
||||
|
||||
// oneDeepSync ensure there is no more than one running deep sync.
|
||||
var oneDeepSync sync.Mutex
|
||||
|
||||
@ -43,7 +46,7 @@ func SyncDeep(i Importer) (errs map[string][]string) {
|
||||
|
||||
errs["_regeneration"] = []string{}
|
||||
|
||||
if fdto, err := os.Create("../htdocs-admin/full_import_report.json"); err == nil {
|
||||
if fdto, err := os.Create(DeepReportPath); err == nil {
|
||||
defer fdto.Close()
|
||||
|
||||
fdto.Write([]byte("disp("))
|
||||
|
Loading…
Reference in New Issue
Block a user