Fix: Added a 5 minute timeout for rebase
This commit is contained in:
parent
9c70286258
commit
cb7e6e89a5
@ -21,6 +21,7 @@ __author__ = 'tanshu'
|
||||
@view_config(request_method='POST', route_name='api_rebase', renderer='json', permission='Rebase')
|
||||
@TryCatchFunction
|
||||
def rebase(request):
|
||||
DBSession.execute('SET statement_timeout TO 300000;')
|
||||
date = request.matchdict.get('date', None)
|
||||
date = datetime.datetime.strptime(date, '%d-%b-%Y')
|
||||
user_id = uuid.UUID(authenticated_userid(request))
|
||||
@ -36,6 +37,7 @@ def rebase(request):
|
||||
for i in voucher_b.inventories:
|
||||
DBSession.add(i)
|
||||
cleanup_lint(date, accounts, batches)
|
||||
DBSession.execute('RESET statement_timeout;')
|
||||
transaction.commit()
|
||||
return {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user