Closed zimeon closed 12 years ago
I have code in the client that reads a sitemap to find the location of the current changeset. At present this usually fails with a 404 unless I add a small sleep between getting the sitemap and the changeset. With a 2s sleep all is good.
without sleep:
simeon@RottenApple src>./resync-client -v --inc http://localhost:8888/ /tmp/sm/Reading sitemap http://localhost:8888/sitemap.xml Read sitemap/sitemapindex from http://localhost:8888/sitemap.xml Parsing as sitemap Got 1 capabilities: Reading changeset http://localhost:8888/changeset/from/879 Usage: resync-client [options] uri_path local_path (-h for help) resync-client: error: Can't read source changeset from http://localhost:8888/changeset/from/879 (Failed to load sitemap/sitemapindex from http://localhost:8888/changeset/from/879 (('http error', 404, 'Not Found', <httplib.HTTPMessage instance at 0x109c02518>)))
with time.sleep(2):
simeon@RottenApple src>./resync-client -v --inc http://localhost:8888/ /tmp/sm/ Reading sitemap http://localhost:8888/sitemap.xml Read sitemap/sitemapindex from http://localhost:8888/sitemap.xml Parsing as sitemap Reading changeset http://localhost:8888/changeset/from/971 Read sitemap/sitemapindex from http://localhost:8888/changeset/from/971 Parsing as sitemap Read source changeset, 1 resources listed updated: http://localhost:8888/resources/262 -> /tmp/sm/resources/262
I have code in the client that reads a sitemap to find the location of the current changeset. At present this usually fails with a 404 unless I add a small sleep between getting the sitemap and the changeset. With a 2s sleep all is good.
without sleep:
with time.sleep(2):