On Jan 22, 2014 7:41 AM, "Petr Bena" benapetr@gmail.com wrote:
The title pretty much say what I need
- Retrieve the page - page must not be changed starts NOW
- Do something what requires user input, possibly may last few minutes
- Save the page ONLY if it wasn't changed, if it was, go back to step 1
this all needs to be done using API, I thought that edit token would help me here, so that I would fetch the token at step 1 and edit using it at step 3, hoping it expire if someone edit the page meanwhile. But this doesn't seem to work according to documentation, because edit token is only changed when user logout.
Is there any super-safe and proper method to do this? Preferably something more reliable than just storing the timestamp and comparing it (in theory someone could edit the page even in short time when timestamp is compared). I need some super-safe lock that prevent all possible race conditions here.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Starttimestamp and basetimestamp?
-bawolff