aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/request.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-12-24 16:59:17 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-12-24 16:59:17 +0100
commit7920c273a204e2469416a30b752b12ccd3160102 (patch)
tree5b3d9ab9596dd5eb079a281f82b836e03eff1617 /server/models/request.js
parent3897209f46f4c4581be2b8963bf9acc28ca5032b (diff)
downloadPeerTube-7920c273a204e2469416a30b752b12ccd3160102.tar.gz
PeerTube-7920c273a204e2469416a30b752b12ccd3160102.tar.zst
PeerTube-7920c273a204e2469416a30b752b12ccd3160102.zip
Move tags in another table
Diffstat (limited to 'server/models/request.js')
-rw-r--r--server/models/request.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/request.js b/server/models/request.js
index 882f747b7..70aa32610 100644
--- a/server/models/request.js
+++ b/server/models/request.js
@@ -79,9 +79,11 @@ function deactivate () {
79 timer = null 79 timer = null
80} 80}
81 81
82function flush () { 82function flush (callback) {
83 removeAll.call(this, function (err) { 83 removeAll.call(this, function (err) {
84 if (err) logger.error('Cannot flush the requests.', { error: err }) 84 if (err) logger.error('Cannot flush the requests.', { error: err })
85
86 return callback(err)
85 }) 87 })
86} 88}
87 89
@@ -298,7 +300,7 @@ function listWithLimitAndRandom (limit, callback) {
298 300
299function removeAll (callback) { 301function removeAll (callback) {
300 // Delete all requests 302 // Delete all requests
301 this.destroy({ truncate: true }).asCallback(callback) 303 this.truncate({ cascade: true }).asCallback(callback)
302} 304}
303 305
304function removeWithEmptyTo (callback) { 306function removeWithEmptyTo (callback) {