Refactored crawler to use task dispatcher

This commit is contained in:
James Mills
2021-02-02 13:13:12 +10:00
parent 4970b16d61
commit 26df009e8f
13 changed files with 578 additions and 51 deletions

View File

@@ -381,6 +381,14 @@ func URLForCached(baseURL, hash string) string {
)
}
func URLForTask(baseURL, uuid string) string {
return fmt.Sprintf(
"%s/task/%s",
strings.TrimSuffix(baseURL, "/"),
uuid,
)
}
// SafeParseInt ...
func SafeParseInt(s string, d int) int {
n, e := strconv.Atoi(s)