4 from osmium.replication import server
6 if __name__ == '__main__':
8 print("Usage: python check_server_for_updates.py <server url> <sequence id>")
11 seqid = int(sys.argv[2])
13 state = server.ReplicationServer(sys.argv[1]).get_state_info()
16 print("ERROR: Cannot get state from URL %s." % (sys.argv[1], ))
19 if state.sequence <= seqid:
20 print("Database up to date.")
23 print("New data available (%i => %i)." % (seqid, state.sequence))