summaryrefslogtreecommitdiff
path: root/lib/Multi/Maintenance.pm
AgeCommit message (Collapse)AuthorFilesLines
2017-12-31Multi::Maintenance: Update cron timingsYorhel1-4/+4
The database has grown and we're on SSDs now, so it's good to revisit these timings and see what needs optimizing, if anything.
2015-10-21SQL: Fix Multi to use the new DB schemaYorhel1-22/+9
That should be the last thing to convert to the new schema.
2015-10-12Notifications: Allow max 500 notifies per user + add SQL index on uidYorhel1-0/+2
Turns out that fetching whether or not you have unread notifications (done on every pageview if you're logged in) was pretty slow. The index speeds up both that query and the "my notifications" view. The extra purge for old notifications for users with more than 500 notifications ensures that the index stays effective for the unread notifications count. Otherwise it'll have to read half of the notifications table anyway to check the 'unread' filter.
2015-07-18Multi::Maintenance: Fix bug in calculating timer for monthly cronYorhel1-1/+1
AE::timer accepts a time interval as argument, not a complete timestamp. So the monthly cron job hasn't run in a while...
2015-05-13Add staff statistic to main menuYorhel1-0/+1
2014-10-22Multi::Maintenance: Converted to use AnyEventYorhel1-204/+142
2014-10-11SQL: Convert login_throttle.timeout to a timestamptzYorhel1-2/+2
Easier to work with in custom queries.
2014-09-25Multi: Update maintenance timings + disable usercacheYorhel1-10/+14
The usercache maintenance cron is causing significant downtime each month, so I've disabled it for now.
2014-08-29Throttle failed login attempts (10/day)Yorhel1-2/+9
2014-08-19Multi: Run maintenance tasks at 12:00 GMTYorhel1-7/+4
In particular, don't run the tasks when I'm asleep. The SQL queries that are run during maintenance can deadlock and cause multi to crash. I want to be awake when that happens.
2011-12-29Maintain VN search cache for hidden entries as wellYorhel1-2/+2
Required in order to search for hidden entries (obviously :P)
2011-08-23Added email confirmation to registration processYorhel1-2/+10
2011-04-29affiliates: +data column, hide hidden links, better browser, Multi fixesYorhel1-0/+1
2011-04-08Update traits_chars cache daily using Multi::MaintenanceYorhel1-4/+10
I'd really prefer incremental updates, but I'll first need to find a proper algorithm...
2011-04-08Added char/tag/trait stats to database statistics boxYorhel1-0/+3
2010-11-01Multi::Maintenance: Automatically remove read notifications after a monthYorhel1-2/+9
2010-03-13Improved VN searchYorhel1-0/+53
This adds a new column to the vn table: c_search, which holds the normalized titles for speedy search results using LIKE. Also split some functions from VNDB::Func that didn't require YAWF into a VNDBUtil module, so Multi can also make use of them. The normalization functions are the same for Multi and VNDB, after all. The API and Multi::IRC still use the old search, these should be updated as well.
2010-01-26Automatically remove sessions that haven't been used for a monthYorhel1-2/+9
2009-12-06Multi::Maintenance: Only run update_vncache() on VNs released within the ↵Yorhel1-8/+25
past 5 days And run only run a full update_vncache() monthly. This was the last daily cron that took quite a while to run, the complete daily cron time has now been reduced from about 90 seconds to about 5 seconds.
2009-12-05SQL: Don't allow argument of update_vncache() to be 0Yorhel1-1/+1
To batch update, simply do a SELECT update_vncache(id) FROM vn; The function is now more readable as well.
2009-11-29SQL: Rewrote tag_vn_calc() to use a WITH RECURSIVE .. SELECT queryYorhel1-3/+3
This is more efficient, and doesn't require the tag_tree() or tag_vn_childs() stored procedures. Does require PostgreSQL 8.4+
2009-11-15SQL: Fixed bug in bayesian rating calculationYorhel1-1/+1
avg_rating should be the average rating of all VNs, not the global average vote.
2009-11-14SQL: Don't count users with ign_votes in bayesian ratingYorhel1-2/+2
They still have influence on the average number of votes per VN and the overall average vote, but this isn't significant. (at least, not at the moment)
2009-11-14SQL: Cached bayesian VN rating and vote countsYorhel1-2/+16
Was a good idea after all...
2009-10-24Removed update_rev() function and monthly revcache cronYorhel1-10/+2
The changes.rev column should be correct in the first place, and in the (most likely) impossible condition that it isn't, the update_rev() function is more likely to make things worse.
2009-10-21Added relation graphs for producersYorhel1-2/+5
TODO: - document the relations - emit a relgraph notify when needed
2009-10-21SQL: Renamed vn_graphs to relgraphs and synced dbgraph.plYorhel1-1/+1
As the same table can easily be used to store producer relation graphs as well.
2009-10-18Multi::Maintenance: Fixed bug with cron jobs running more than onceYorhel1-2/+2
2009-09-25Multi::Maintenance: Check for and remove unused relation graphs dailyYorhel1-5/+11
And updated some comments while I was at it
2009-08-09Multi::Maintenance: Added logging of important statisticsYorhel1-8/+11
Requires the new PoCo-Pg
2009-07-29Rewrote Multi::MaintenanceYorhel1-99/+99
Everything now uses Async SQL access, and doesn't rely on POE::Component::Cron anymore. I removed a few maintenance functions that weren't needed. Warning for unkanime is already done by Multi::Anime, and integrity checking should really be done in PgSQL. The tag<->vn cache is now also regenerated daily rather than hourly.
2009-04-11SQL bugfix in Multi's "maintenance integrity"Yorhel1-1/+1
2009-03-15Let Multi recalculate users.c_tags each month, and some warning fixesYorhel1-0/+6
2009-03-08Added caching of tags_vn_bayesian and the VN count for tagsYorhel1-4/+13
Updated hourly by Multi. May want to look for a better way to update this cache, because I'm afraid the current tags_vn_calc() is going to perform very badly on larger databases.
2009-01-10Automatically recalculate the vn popularity daily using Multi::MaintenanceYorhel1-3/+11
2008-11-29Made Multi update the two new caches every first day of the monthYorhel1-3/+36
May actually be a better idea to just log a HUGE WARNING in case the cached values don't match the actual values, as that really shouldn't happen. But oh well, updating is fine, too. Makes sure everything stays correct in the long term.
2008-11-12Fixed Multi to use relative paths and to use the new configuration filesYorhel1-4/+4
2008-08-09Implemented a notification system and made some general improvements in Multi.yorhel1-2/+11
git-svn-id: svn://vndb.org/vndb@81 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-07-09Oops, forgot to remove the reference to the POE method...yorhel1-1/+1
git-svn-id: svn://vndb.org/vndb@64 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-07-09Added possibility to create a hidden thread and removed ratings calculation ↵yorhel1-8/+2
from Multi git-svn-id: svn://vndb.org/vndb@63 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-06-30Small prev -> rev fix, and removed unnesessary $prep in Multi's repliesyorhel1-6/+7
git-svn-id: svn://vndb.org/vndb@50 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-05-28Realized the vncache should be updated daily in order to catch recently ↵yorhel1-2/+2
released titles. Fixed Multi::IRC to catch dx.x IDs without matching version numbers git-svn-id: svn://vndb.org/vndb@18 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-05-19Too many changes to keep track of. See ChangeLog. (I should commit more ↵yorhel1-13/+7
often -.-) git-svn-id: svn://vndb.org/vndb@13 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-05-04MOAR!1.15yorhel1-2/+30
git-svn-id: svn://vndb.org/vndb@11 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-04-29...another commit...yorhel1-6/+37
git-svn-id: svn://vndb.org/vndb@9 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-04-26Stupid comments - like I can keep track of everything I change...yorhel1-0/+84
git-svn-id: svn://vndb.org/vndb@5 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b