We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql_operation(0, oneId, twoId, threeId, fc)
def sql_operation(w, oneId, twoId, threeId, fc): global code_folder fc2=0 try: if w==0: try: mydict = SqliteDict(code_folder+'core.sqlite', autocommit=True) uid = str(oneId)+"_"+str(twoId)+"_"+str(threeId) mydict[uid] = fc except Exception as e0: logger.error(e0) finally: mydict.close() elif w==1: try: logger.info('Acquiring Lock by fetchRow') lock.acquire(timeout=5) logger.info('Lock Taken by fetchRow') mydict = SqliteDict(code_folder+'core.sqlite', autocommit=True) uid = str(oneId)+"_"+str(twoId)+"_"+str(threeId) fc2 = mydict[uid] except Exception as e1: logger.error(e1) finally: mydict.close() logger.info('Releasing Lock by fetchRow') lock.release() logger.info('Lock Released by fetchRow') except Exception as e: logger.error(e) return fc2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
sql_operation(0, oneId, twoId, threeId, fc)
The text was updated successfully, but these errors were encountered: