Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

59 commits

Auteur SHA1 Message Date
ElegantMonkey
3dced6fdf0 Use Mutex when modifying failedOperations, add exponential cooldown
Just to be safe, won't allow concurrent goroutines to modify the map.

The exponential cooldown prevents newer torrents with no seeds
blocking older ones with seeds, when there are enough failures that a
cooldown event would fill the queue with only failed torrents.
2017-05-14 19:30:56 -03:00
ElegantMonkey
a55cf2a803 Use NoCount version of GetTorrents
The normal GetTorrents version always called COUNT(*) on the query,
which consistently took around 300 ms. With the NoCount, the SELECT
queries take 5-50 ms.
2017-05-14 18:24:41 -03:00
ElegantMonkey
cae0026a67 Add fail cooldown
After a set cooldown, torrents that failed to be fetch will be able
to be fetched again. Set FailCooldown to -1 to disable.
2017-05-14 18:10:39 -03:00
ElegantMonkey
83de593a65 Exclude failed operations from query
Instead of loading more rows to compensate for failed operations,
exclude them at the query.
2017-05-14 16:47:48 -03:00
ElegantMonkey
58869114d7 Don't update Length if it hasn't changed 2017-05-14 12:21:49 -03:00
ElegantMonkey
7d8cbe1393 Add Upload and Download limiters, rely on unique_index for avoiding duplicates
The FileList that is read with GetTorrents is empty, as it's only loaded with
GetTorrentById. So, always insert the new FileList on the database, and rely on
the unique_index to avoid duplications.
2017-05-14 11:35:03 -03:00
ElegantMonkey
839e6068df Add FileList view to view.html template
Also added the code for FileList loading on torrentService.
2017-05-14 10:19:19 -03:00
ElegantMonkey
e1f1c9d0c3 Update MetainfoFetcher query logic
It used to update only torrents with NULL or 0 filesizes, setting
both their filesizes and the file lists. Now, it looks for both
NULL or 0 filesizes and empty file lists.
2017-05-14 09:05:20 -03:00
ElegantMonkey
2da2ad4214 FilesizeFetcher -> MetainfoFetcher 2017-05-14 08:20:34 -03:00
ElegantMonkey
80034bb52b Also read file lists from metadata, fix Length == 0 2017-05-13 23:12:18 -03:00
ElegantMonkey
a1dc2d3587 Add error message to log 2017-05-13 21:30:06 -03:00
akuma06
ed26ee81eb Merge branch 'dev' into dev 2017-05-14 00:55:17 +02:00
ElegantMonkey
4d69ee4eaa Use buffered channels, add test for invalid hash 2017-05-13 19:35:35 -03:00
ElegantMonkey
fb677d4d9d Use sync.WaitGroup for FetchOperations 2017-05-13 16:07:39 -03:00
ElegantMonkey
a068984af3 Add filesize fetcher mode 2017-05-13 14:58:48 -03:00
sfan5
72ab7a490c Minor optimization about fetching old comments 2017-05-13 17:30:29 +02:00
sfan5
c0be570e54 Torrent Reassign feature for modpanel 2017-05-13 17:29:21 +02:00
sfan5
c5fe70800d Disable CTEs and TSQuery for now 2017-05-12 19:38:08 +02:00
sfan5
5cb672b06a Stop RSS from being so slow 2017-05-12 17:54:08 +02:00
ayame-git
1bf4012eb2 yea.. 2017-05-10 21:42:20 +03:00
Ramon Dantas
5cc945ca9a Merge branch 'master' into fix-large-numbers 2017-05-10 08:57:42 -03:00
sfan5
775f9c15ad Display username of old uploads alongside れんちょん 2017-05-10 13:32:45 +02:00
sfan5
ee6aea139f Add FIXMEs 2017-05-10 13:09:23 +02:00
Your Name
b5adfb8eb4 Merge remote-tracking branch 'tom/mod' 2017-05-10 07:32:01 +00:00
Your Name
8d9605def3 delete shit 2017-05-10 07:10:23 +00:00
tomleb
1ddd4c12f8 Start mod system 2017-05-10 00:34:00 -04:00
Anthony D'Alessandro
30d82f77bc fucking typo (#251)
* Update torrent.go

* another typo yay!!!

* typo
2017-05-09 22:54:12 -05:00
Austin
48a9f7ebc2 package dup 2017-05-09 22:40:47 -05:00
akuma06
9a435ccdc0 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	service/torrent/torrent.go
#	service/user/user.go
2017-05-10 05:33:40 +02:00
akuma06
989945f09b Shitty Moderation page
No HTML done, could'nt test with nyaa.exe :/
1 page with overview of torrents, comments, users
1 page list comments
1 page list torrents
1 page list users
1 route delete torreny
1 route delete comment
Users can be deleted and edited by their route user_profile_edit (I
think)
2017-05-10 05:24:18 +02:00
Chris MacLeod
c9b72206a5 Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds

The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.

* Style changes and old code removal in router

Router needs a lot of work done to its (lack of) error handling.

* Dead code removal and style changes

Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.

* Finish dead code removal and style changes

Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.

* Fix accidental find-and-replace

* Style, error checking, saftey, bug fix changes

* Redo error checking erased during merge

* Re-add merge-erased fix. Make Safe safe.
2017-05-09 21:34:40 -05:00
akuma06
0cd1e6d653 Revert "Revert "Mod Page (WIP)""
This reverts commit 233c859723.
2017-05-10 04:03:25 +02:00
akuma06
bea9fdab04 Revert "Mod Page (WIP)"
This reverts commit 55590cf7b3.
2017-05-10 04:03:09 +02:00
akuma06
d4c7138081 Mod Page (WIP) 2017-05-10 04:02:23 +02:00
ElegantMonkey
192d91ed2c Fix conflicts 2017-05-09 21:30:41 -03:00
ElegantMonkey
0b0abb1979 Fix large torrent IDs giving a blank page 2017-05-09 21:23:36 -03:00
PantsuDev
381afc3952 Merge pull request #221 from bakape/db-errors
Better DB error handling
2017-05-10 06:45:26 +10:00
PantsuDev
d02672add8 Merge pull request #217 from sfan5/installgentoo
Various changes
2017-05-10 06:44:10 +10:00
bakape
c46c386981 Better DB error handling 2017-05-09 20:23:21 +03:00
Jeff
18d6ad3992 make rss fast again :^) 2017-05-09 11:07:42 -04:00
sfan5
fb07da18ec Display uploader name with link to profile page 2017-05-09 16:21:56 +02:00
bakape
a0ae1f7e6a Refactor search
Optimise, error handling and avoid some exploits
2017-05-09 14:31:58 +03:00
bakape
d0d44a4849 Death to reallocations! 2017-05-09 02:56:57 +03:00
sfan5
975ce5e6d4 Don't look for old comments on new torrents 2017-05-08 23:53:37 +02:00
sfan5
5bdd160d61 Fix absence of pagination on home page 2017-05-08 22:50:56 +02:00
sfan5
3a44a1b6ae Cleanup 2017-05-08 22:50:56 +02:00
sfan5
aa2b2c2544 Fix search 2017-05-08 22:50:56 +02:00
sfan5
5d36bba34d Make comments work 2017-05-08 22:50:56 +02:00
Jeff Becker
ddc30e3d96 fix empty search query bug 2017-05-08 10:54:05 -04:00
Eliot Whalan
eca5079080 Optimize sql queries 2017-05-08 23:50:18 +10:00