http-fstree needs to write state and .lock for anoia.svc
This commit is contained in:
parent
45a7f96bd4
commit
310ac30f24
@ -9,8 +9,13 @@
|
|||||||
(assert nil (.. "error " code ": " str))
|
(assert nil (.. "error " code ": " str))
|
||||||
|
|
||||||
(body { : last-modified })
|
(body { : last-modified })
|
||||||
(let [service (svc.open dest)]
|
(let [service (svc.open dest)
|
||||||
|
lock (.. dest "/.lock")
|
||||||
|
state (.. dest "/state")]
|
||||||
|
(with-open [fout (io.open lock :w)] (fout:write ""))
|
||||||
(service:output "." (json.decode body))
|
(service:output "." (json.decode body))
|
||||||
|
(with-open [fout (io.open state :w)] (fout:write "ok"))
|
||||||
|
(os.remove lock)
|
||||||
(utime dest last-modified))))
|
(utime dest last-modified))))
|
||||||
|
|
||||||
(fn run [] (download (. arg 1) (. arg 2)))
|
(fn run [] (download (. arg 1) (. arg 2)))
|
||||||
|
Loading…
Reference in New Issue
Block a user