Cleanup after database use
This commit is contained in:
@@ -83,7 +83,7 @@ class Release(Plugin):
|
||||
|
||||
fireEvent('movie.restatus', movie.id)
|
||||
|
||||
db.remove()
|
||||
db.close()
|
||||
|
||||
return True
|
||||
|
||||
@@ -109,7 +109,7 @@ class Release(Plugin):
|
||||
rel.delete()
|
||||
db.commit()
|
||||
|
||||
db.remove()
|
||||
db.close()
|
||||
return jsonified({
|
||||
'success': True
|
||||
})
|
||||
@@ -126,7 +126,7 @@ class Release(Plugin):
|
||||
rel.status_id = available_status.get('id') if rel.status_id is ignored_status.get('id') else ignored_status.get('id')
|
||||
db.commit()
|
||||
|
||||
db.remove()
|
||||
db.close()
|
||||
return jsonified({
|
||||
'success': True
|
||||
})
|
||||
@@ -153,14 +153,14 @@ class Release(Plugin):
|
||||
'files': {}
|
||||
}), manual = True)
|
||||
|
||||
db.remove()
|
||||
db.close()
|
||||
return jsonified({
|
||||
'success': True
|
||||
})
|
||||
else:
|
||||
log.error('Couldn\'t find release with id: %s' % id)
|
||||
|
||||
db.remove()
|
||||
db.close()
|
||||
return jsonified({
|
||||
'success': False
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user