Closed madhavajay closed 2 years ago
Hey, @madhavajay. If I understand correctly,
{'error': 'future_key 9ab93181 already exists', 'key': '9ab93181', 'result_url': 'http://localhost/cmd/echo?key=9ab93181'}
This as an example is what you are looking for, right ?
There could be an option during call to ignore if theres an existing entry and overwrite it?
While there is no option to overwrite an existing entry, there is another option (force_unique_key
) that allows you to always have a unique entry. Add the force_unique_key
attribute in the POST
request for this. Example: {"args": ["hello", "world"], "force_unique_key": true}
.
See the "Hint" card in this section of the docs for more info.
It would be great to make the calls idempotent to some degree so that if you call it twice you can still follow the result without having to manually reconstruct the correct result url.
The error JSON could have the correct
result_url
so you don't need to construct it.There could be an option during call to ignore if theres an existing entry and overwrite it?
BTW awesome lib, this was exactly what I was looking for. 🤗