Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

osmosis --read-replication-lag crashes when lag < 61 seconds #5036

Open
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Open

Comments

@openstreetmap-trac
Copy link

Reporter: wambacher
[Submitted to the original trac issue database at 10.20am, Wednesday, 20th November 2013]

hi, i'm using osmosis to update my planet-database with diff-files. at the end of my script i run osmosis -q --read-replication-lag humanReadable=yes workingDirectory=. to get the actual lag.

It's crashing when the lag is less than 61 Seconds. See Log.

The fix is quite simple:
in ReplicationLagReader.java change

                                // just some seconds
				System.out.println(
					new MessageFormat("{0} second(s)").format(lag)
				);

to

                                // just some seconds
                                Object[] args = {lag};
				System.out.println(
					new MessageFormat("{0} second(s)").format(args)
				);

sorry, no patch and no git. never done that.

@openstreetmap-trac
Copy link
Author

Author: wambacher
[Added to the original trac issue at 11.09am, Wednesday, 20th November 2013]

btw: if the lag is less then 61 seconds, is's allways 60 or zero - does that make sense?

regards

walter

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

No branches or pull requests

1 participant