summaryrefslogtreecommitdiff
path: root/lib/Multi
AgeCommit message (Collapse)AuthorFilesLines
2009-11-02Multi::Core: Fixed bug in daemonizing codeYorhel1-3/+3
Apparently closing STDOUT/STDIN/STDERR will exit the process... so open /dev/null instead. (As done in the perlipc manual - of course doesn't work on windows, but nobody cares about that)
2009-11-02Multi::Core: Implemented daemonizing and PID fileYorhel1-3/+33
The location of the PID file isn't configurable, so this change currently limits running only one Multi for each VNDB installation. (Not that you'd need more...)
2009-10-24Multi::IRC: Fixed SQL syntax errorYorhel1-1/+1
Introduced in 69d8738688ebb72707fe377b7ce7c717407aea96
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-24Multi::RG: Minor log format changeYorhel1-1/+1
Better aligned, easier to read.
2009-10-21Added relation graphs for producersYorhel2-78/+146
TODO: - document the relations - emit a relgraph notify when needed
2009-10-21SQL: Renamed vn_graphs to relgraphs and synced dbgraph.plYorhel2-2/+2
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-10-12SQL: Converted changes.type to an ENUMYorhel1-4/+4
This is a very important column in a very important table, I hope I didn't forget to update a piece of code somewhere...
2009-09-27Converted anime.type to ENUM and made them translatableYorhel1-1/+12
Again, two separate but related things.
2009-09-27Multi::RG: Removed unused variableYorhel1-1/+0
2009-09-26Display full release dates in relation graphsYorhel1-1/+6
Interface consistency
2009-09-26Converted VN relations to ENUM data type and made them translatableYorhel1-15/+7
OK, these are actually two separate things: to make the relations translatable they didn't necessarily have to be stored as enum, and I could've also converted them to enum but not have it translatable. Nevertheless, it was easier to just do both at the same time. Also note how I used the string "$____vnrel_<rel>____$" as identifier in the relation graphs while I could have used something a lot shorter ("$<rel>$" would have been fine, for example). This is done so that graphviz can make some space for those relations - the long identifier gives a slightly more realistic representation of the actual length of the relation titles.
2009-09-25Multi::Maintenance: Check for and remove unused relation graphs dailyYorhel1-5/+11
And updated some comments while I was at it
2009-09-25Use inline SVG for relation graphsYorhel1-31/+60
The graphs are now stored in the DB in SVG format, the static/rg/ directory can be removed (not used anymore). SVG data is stored using the xml data type, so now I can say for sure you'd need at least PostgreSQL 8.3. This feature still needs some tweaking, though. Current state isn't perfect.
2009-08-23Multi::IRC: lowercase channel names in idlequotesYorhel1-1/+1
2009-08-12Multi::IRC: Properly handle newlines in edit summariesYorhel1-0/+1
2009-08-11Multi::IRC: Various small improvementsYorhel1-5/+8
- Don't report edits made by Multi - Fixed a synchronisation issue in the double-notify detection - Users in the 'masters' list has access to 'OP' commands as well (without needing +o) - Doubled the quotes spam delay
2009-08-09Multi::IRC: Proper fix of the new notify detection codeYorhel1-16/+33
This is how I should have done it in the first place. Don't use stupid hacks if you know it's likely going to result in strange behaviour...
2009-08-09Multi::IRC: Got rid of crash in the throttle functionYorhel1-1/+1
2009-08-09Multi::IRC: Fix double-notify bugYorhel1-0/+1
timestamptz data types have sub-second precision, but we use time() with second precision for comparing, resulting in false positives. Using Time::HiRes::time should give the same precision as PostgreSQL's NOW(), so things should be working fine now. It's still a bad idea to use Multi's time instead of a PostgreSQL value for comparing... should really think of a clean way of fixing this.
2009-08-09Multi::IRC: Fixed authentication level checking bugYorhel1-3/+4
Everyone had access to the commands with the |8 flag enabled. Oops!
2009-08-09Multi::Maintenance: Added logging of important statisticsYorhel1-8/+11
Requires the new PoCo-Pg
2009-08-09Multi::Core: Actually log to file instead of stdoutYorhel1-1/+1
2009-08-09Converted changes.added to timestamptzYorhel2-13/+13
That was the last one. I hope I haven't forgotten to update anything.
2009-08-08Converted tags.added to timestamptzYorhel1-1/+1
2009-08-08Converted threads_posts.date and edited to timestamptzYorhel1-1/+1
Everything still seems to be working fine so far.
2009-08-05Multi::Core: Got rid of 'undefined' warning in pg_error + ChangeLog updateYorhel1-1/+1
2009-08-05Multi::IRC: Added !p producer search and fixed tiny bug in !vnYorhel1-5/+31
2009-08-05Multi::IRC: Reimplemented notifications using PgSQL LISTEN/NOTIFYYorhel1-22/+66
2009-08-05Multi::IRC: Spam random quotes in idle channelsYorhel1-1/+15
'idle' is currently defined as 60+rand(300) minutes, so it'll only occur in *very* idle channels... might be an idea to lower these numbers later on.
2009-08-05Multi::IRC: Wrote generic throttle function and put a limit on !vn usageYorhel1-12/+40
2009-08-05Multi::IRC: Added !quote command to reply with a random quote from the DBYorhel1-2/+13
2009-08-05Multi::IRC: Re-added the !vn commandYorhel1-36/+36
Works as it did before. But maybe it's time to add a small throttle to prevent misuse?
2009-08-05Multi::IRC: Don't listen to unaddressed commands without the ! triggerYorhel1-2/+2
Tiny bug introduced in a recent commit.
2009-08-05Multi::IRC: Allow commands to be called by addressing the botYorhel1-10/+13
And force this for some commands. Calling !die in a channel with multiple bots isn't a good idea, after all...
2009-08-05Multi::IRC: Display edit summary on edit linksYorhel1-3/+9
2009-08-05Multi::IRC: Display board titles in thread linkingYorhel1-2/+19
Nothing beats seeing a: <Multi> [t2.7] Reply to Alias: added Japanese title Posted in db, u:retardsrox, u:nacchi, v:Natsu, Semi, Shoujo, v:Dal-eu Jajang-ga By applehq @ http://beta.vndb.org/t2.7
2009-08-04Started on Multi::IRC rewriteYorhel1-254/+246
Most of the functionality of the old IRC bot should be present again, with notifications and the !vn command being the only exceptions. I'll reimplement those later. The configuration has changed a little: - 'user' variable renamed to 'nick' - 'channel' renamed to 'channels' (it's an arrayref, after all) - the 'masters' variable now uses IRC masks rather than nicks This new version also has three user levels rather than two: regular users, OPs in the first channel, and 'masters'. This way #vndb OPs can get control over some useful functions as well. The 'master' functions are far too powerful and as such should only be used by the person operating the bot.
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-07-23Remove session aliases in shutdown handlerYorhel5-0/+5
This isn't really necessary when shutting down the entire process, but it is for the individual session to shut down. This will make it possible to load/unload/reload Multi modules on demand without restarting the process.
2009-07-23Implemented relgraph notify from PgSQL triggerYorhel1-0/+2
This finishes the new relation graph generator, as it'll now regenerate graphs as soon as is needed. This obsletes the VNDB::Util::Misc::vnCacheUpdate() function, this functionality is provided by triggers within PostgreSQL. The update_vncache(0) procedure is now significantly slower due to the trigger on the vn table. It'd be a good idea to rewrite this procedure by using triggers and conditional updates, to drastically lower the number of rows that need to be updated.
2009-07-19Rewrote Multi::RGYorhel1-129/+88
It should be a bit more efficient and non-blocking. Also a lot less verbose with logging.
2009-07-19Multi::Core: Correctly set the pg_enable_utf8 flagYorhel1-1/+1
Before this edit, the options part of the DSN was incorrect, resulting in DBD::Pg ignoring the pg_enable_utf8 flag.
2009-07-19Notify Multi::Image via PostgreSQL for new screenshotsYorhel1-2/+2
This finished the rewrite of Multi::Image and everything surrounding it.
2009-07-19Converted and renamed screenshots.status (int) to processed (bool)Yorhel1-3/+3
There were only two states, processed and unprocessed, so simply using a boolean column with correct naming is more clarifying.
2009-07-18Notify Multi::Image for new cover images via LISTEN/NOTIFYYorhel1-0/+2
Yay! Another weird shared-memory-command optimized away. And the image resizer reacts a lot faster now. Noticably, even.
2009-07-18Rewrote Multi::ImageYorhel1-164/+61
Decided to remove the Image::MetaData::JPEG dependency as well, as the Image::Magick::Thumbnail function removes a lot of unecessary information, profiles and other data as well.
2009-07-18Use PostgreSQL's LISTEN/NOTIFY to notify Multi::Anime for new animeYorhel1-1/+5
The notify is called from a trigger function, which is called on any UPDATE or INSERT INTO query of which the lastfetch column is NULL. This guarantees that anime info in the DB will always be updated, no matter how its inserted.
2009-07-18Rewrote Multi::AnimeYorhel1-162/+104
No shared memory! Asynchronous SQL! yay!