uktrade / mobius3

Continuously sync folder to S3, using inotify under the hood
MIT License
50 stars 3 forks source link

Sync state #47

Open jogomu opened 2 years ago

jogomu commented 2 years ago

Is there an easy way to know (e.g. from log entry) whether mobius3 is in an idle state where there is no pending or ongoing work? I.e. to check whether mobius3 thinks everything is sync'd ?

michalc commented 1 year ago

Hi @jogomu,

Not really in any particularly clear way I think. What would be the ideal thing for mobius3 to do from your point of view? (I've thought about this before but not really come to any good conclusion...)

Thanks,

Michal

jgm-ktg commented 1 year ago

Just a message to stdout/stderr periodically would be fine (it can be redirected to a log that a user can tail or whatever they want). A message indicating that sync is both healthy and up-to-date, perhaps with a timestamp about when this state was noticed. If such a message is logged periodically the the user would have confidence that things are working. The health check should be based on having actually re-fetched the local and s3 metadata for a fresh comparison. As I said in the other open ticket, mobius3 has "silently failed" for me before where it stops syncing and logging but there is no way to know that this happened other for not seeing the changes propagate.