dsc icon indicating copy to clipboard operation
dsc copied to clipboard

Can dsc watch scan upload files from before it was started?

Open antifuchs opened this issue 4 years ago • 2 comments

I have just started running dsc watch and am worrying about a failure mode: When dsc watch isn't running and, e.g., an ADF scanner uploads new documents to an SFTP drop directory, starting the dsc watch job does not cause it to submit the files that were previously uploaded.

I guess I can construct a systemd unit that works like this, but probably still has a race condition (e.g. a file getting uploaded at exactly the right/wrong point in time). I think I would love to see this solved in the watch command itself.

antifuchs avatar Oct 01 '21 20:10 antifuchs

Yeah, that's an interesting question.I have no good idea how to solve this. Can only think of periodically doing the dsc upload --traverse once in a while. Or maybe after starting the watch command use a find to get all files added in the last n minutes and touch them. But it's hard to say how long to look back. Hm, this could be done in the watch command but seems quite expensive (for large directories) for this case…? It is also possible to do this as a ExecStartPost in the systemd unit.

eikek avatar Oct 01 '21 22:10 eikek

Same problem here, except I'm using a docker image, and I'd prefer not having to have two docker containers for this task

daviddavo avatar Mar 26 '24 19:03 daviddavo