diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-24 16:59:17 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-24 16:59:17 +0100 |
commit | 7920c273a204e2469416a30b752b12ccd3160102 (patch) | |
tree | 5b3d9ab9596dd5eb079a281f82b836e03eff1617 /server/models/request.js | |
parent | 3897209f46f4c4581be2b8963bf9acc28ca5032b (diff) | |
download | PeerTube-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.js | 6 |
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 | ||
82 | function flush () { | 82 | function 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 | ||
299 | function removeAll (callback) { | 301 | function 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 | ||
304 | function removeWithEmptyTo (callback) { | 306 | function removeWithEmptyTo (callback) { |