Created
August 19, 2019 19:12
-
-
Save voglster/b77d5ed24e0cbf678167c1907571c26f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def log(msg): | |
while True: | |
rh.reload() | |
version = rh.version | |
rh.log.append(str(msg))) | |
rh.version = version + 1 | |
try: | |
rh.save(save_condition={'version': version}) | |
break | |
except OperationError: | |
pass | |
logging.info(msg) | |
def update_status(new_status): | |
while True: | |
rh.reload() | |
version = rh.version | |
rh.status = new_status | |
rh.version = version + 1 | |
try: | |
rh.save(save_condition={'version': version}) | |
break | |
except OperationError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment