3 ms·
I'm gonna go out on a weird over-complicated obscure way of identifying the problem when it happens.. Depending on available resources of course, you could run
by bilekas 4y ago
I'm gonna go out on a weird over-complicated obscure way of identifying the problem when it happens..
Depending on available resources of course, you could run regular checks of the xpath validity, with a mapping of of other identifiers, you could use those others to see the new xpath, auto update the code, call a script to compile and republish.
Thats an ugly way but doable.
Another would be to have a remote mapping, so when you open the app, you get the 'latest' mappings. This way you can still run your 'is_this_xpath_valid' and if not update the xml/json whatever. When the app opens, it downloads the latest version and continues on.
I say that option rather than a remote API because of sheer request load possible is wild, whereas a simple file is cheap.
If you're rich, have your cron/checker run a bit more regularly then and api that, like a cache checks each request, you can have it running in a passive lambda for example (not sure best way to optimize that one).
My long story short is, try to remove the dependency on the services you're consuming. In this case it's a weird one but if you want any help, you're not open source so dm, I love this stuff.