mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
bugfix: Add delay between create and update calls (#174)
This helps mitigate a 409 conflict response from Confluence when creating a new page and then updating it right away. This may not be the cleanest solution, but it seems to do the trick. Resolves #139
This commit is contained in:
parent
5ad1a4abe5
commit
7b359b19f7
5
main.go
5
main.go
@ -6,6 +6,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/docopt/docopt-go"
|
"github.com/docopt/docopt-go"
|
||||||
"github.com/kovetskiy/lorg"
|
"github.com/kovetskiy/lorg"
|
||||||
@ -306,6 +307,10 @@ func processFile(
|
|||||||
meta.Title,
|
meta.Title,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
// (issues/139): A delay between the create and update call
|
||||||
|
// helps mitigate a 409 conflict that can occur when attempting
|
||||||
|
// to update a page just after it was created.
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
target = page
|
target = page
|
||||||
|
Loading…
x
Reference in New Issue
Block a user