[dw-free] better organization of LJ functions
[commit: http://hg.dwscoalition.org/dw-free/rev/ee20fa5fbfd0]
http://bugs.dwscoalition.org/show_bug.cgi?id=3965
Move @LJ::USER_TABLES, %LJ::LOCK_OUT from ljlib.pl to LJ/DB.pm. No
functional change.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3965
Move @LJ::USER_TABLES, %LJ::LOCK_OUT from ljlib.pl to LJ/DB.pm. No
functional change.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/DB.pm
- cgi-bin/ljlib.pl
-------------------------------------------------------------------------------- diff -r dc603e008767 -r ee20fa5fbfd0 cgi-bin/LJ/DB.pm --- a/cgi-bin/LJ/DB.pm Tue Oct 18 18:51:52 2011 +0800 +++ b/cgi-bin/LJ/DB.pm Tue Oct 18 18:56:44 2011 +0800 @@ -35,6 +35,39 @@ 'time_report' => \&LJ::DB::dbtime_callback, }; +# tables on user databases (ljlib-local should define @LJ::USER_TABLES_LOCAL) +# this is here and no longer in bin/upgrading/update-db-{general|local}.pl +# so other tools (in particular, the inter-cluster user mover) can verify +# that it knows how to move all types of data before it will proceed. +@LJ::USER_TABLES = ("userbio", "birthdays", "cmdbuffer", "dudata", + "log2", "logtext2", "logprop2", "logsec2", + "talk2", "talkprop2", "talktext2", "talkleft", + "userpicblob2", "subs", "subsprop", "has_subs", + "ratelog", "loginstall", "sessions", "sessions_data", + "modlog", "modblob", "userproplite2", "links", + "userblob", "userpropblob", + "clustertrack2", "reluser2", + "tempanonips", "inviterecv", "invitesent", + "memorable2", "memkeyword2", "userkeywords", + "trust_groups", "userpicmap2", "userpic2", + "s2stylelayers2", "s2compiled2", "userlog", + "logtags", "logtagsrecent", "logkwsum", + "recentactions", "usertags", "pendcomments", + "loginlog", "active_user", "bannotes", + "notifyqueue", "cprod", "blobcache", + "jabroster", "jablastseen", "random_user_set", + "poll2", "pollquestion2", "pollitem2", + "pollresult2", "pollsubmission2", + "embedcontent", "usermsg", "usermsgtext", "usermsgprop", + "notifyarchive", "notifybookmarks", "pollprop2", "embedcontent_preview", + "logprop_history", "import_status", "externalaccount", + "content_filters", "content_filter_data", "userpicmap3", + ); + +# keep track of what db locks we have out +%LJ::LOCK_OUT = (); # {global|user} => caller_with_lock + + package LJ::DB; use Carp qw(croak); # import croak into package LJ::DB diff -r dc603e008767 -r ee20fa5fbfd0 cgi-bin/ljlib.pl --- a/cgi-bin/ljlib.pl Tue Oct 18 18:51:52 2011 +0800 +++ b/cgi-bin/ljlib.pl Tue Oct 18 18:56:44 2011 +0800 @@ -100,38 +100,6 @@ sub END { LJ::end_request(); } -# tables on user databases (ljlib-local should define @LJ::USER_TABLES_LOCAL) -# this is here and no longer in bin/upgrading/update-db-{general|local}.pl -# so other tools (in particular, the inter-cluster user mover) can verify -# that it knows how to move all types of data before it will proceed. -@LJ::USER_TABLES = ("userbio", "birthdays", "cmdbuffer", "dudata", - "log2", "logtext2", "logprop2", "logsec2", - "talk2", "talkprop2", "talktext2", "talkleft", - "userpicblob2", "subs", "subsprop", "has_subs", - "ratelog", "loginstall", "sessions", "sessions_data", - "modlog", "modblob", "userproplite2", "links", - "userblob", "userpropblob", - "clustertrack2", "reluser2", - "tempanonips", "inviterecv", "invitesent", - "memorable2", "memkeyword2", "userkeywords", - "trust_groups", "userpicmap2", "userpic2", - "s2stylelayers2", "s2compiled2", "userlog", - "logtags", "logtagsrecent", "logkwsum", - "recentactions", "usertags", "pendcomments", - "loginlog", "active_user", "bannotes", - "notifyqueue", "cprod", "blobcache", - "jabroster", "jablastseen", "random_user_set", - "poll2", "pollquestion2", "pollitem2", - "pollresult2", "pollsubmission2", - "embedcontent", "usermsg", "usermsgtext", "usermsgprop", - "notifyarchive", "notifybookmarks", "pollprop2", "embedcontent_preview", - "logprop_history", "import_status", "externalaccount", - "content_filters", "content_filter_data", "userpicmap3", - ); - -# keep track of what db locks we have out -%LJ::LOCK_OUT = (); # {global|user} => caller_with_lock - use LJ::DB; use LJ::Tags; require "ljtextutil.pl"; --------------------------------------------------------------------------------