Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
antifuchs opened this issue Oct 1, 2021 · 2 comments
Open

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

antifuchs opened this issue Oct 1, 2021 · 2 comments

Comments

@antifuchs
Copy link
Contributor

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.

@eikek
Copy link
Member

eikek commented Oct 1, 2021

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.

@daviddavo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants