fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-04-10 02:51 pm

[dw-free] allow temporary suspends of new imports

[commit: http://hg.dwscoalition.org/dw-free/rev/2e4c78697103]

http://bugs.dwscoalition.org/show_bug.cgi?id=3601

Wrap importing sources in an is_enabled block, to prevent adding future
imports.

Patch by [staff profile] denise.

Files modified:
  • bin/upgrading/en.dat
  • cgi-bin/LJ/Widget/ImportChooseSource.pm
  • etc/config.pl
--------------------------------------------------------------------------------
diff -r ea1623701681 -r 2e4c78697103 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Fri Apr 08 21:14:26 2011 +0800
+++ b/bin/upgrading/en.dat	Sun Apr 10 22:51:02 2011 +0800
@@ -4551,6 +4551,8 @@ widget.importchoosedata.item.lj_userpics
 
 widget.importchoosesource.btn.continue=Continue →
 
+widget.importchoosesource.disabled=Starting a new import is temporarily disabled due to high volume. Existing imports will still be processed in the order they were submitted. New imports will be available again once the import queue clears out a little more.
+
 widget.importchoosesource.error.nocredentials=Please provide a username and password for the service that you selected.
 
 widget.importchoosesource.error.nohostname=Please select a service to import data from.
diff -r ea1623701681 -r 2e4c78697103 cgi-bin/LJ/Widget/ImportChooseSource.pm
--- a/cgi-bin/LJ/Widget/ImportChooseSource.pm	Fri Apr 08 21:14:26 2011 +0800
+++ b/cgi-bin/LJ/Widget/ImportChooseSource.pm	Sun Apr 10 22:51:02 2011 +0800
@@ -29,6 +29,9 @@ sub render_body {
 
     my $u = LJ::get_effective_remote();
     return "" unless LJ::isu( $u );
+
+    return $class->ml( 'widget.importchoosesource.disabled' )
+        unless LJ::is_enabled('importing');
 
     my @services = (
         {
diff -r ea1623701681 -r 2e4c78697103 etc/config.pl
--- a/etc/config.pl	Fri Apr 08 21:14:26 2011 +0800
+++ b/etc/config.pl	Sun Apr 10 22:51:02 2011 +0800
@@ -142,12 +142,14 @@
                  blockwatch => 1,
                  'community-logins' => 0,
                  directory => 0,
+                 esn_archive => 1,
                  eventlogrecord => 1,
                  feedster_search => 0,
                  free_create => 1,
                  googlecheckout => 1,
+                 icon_renames => 0,
+                 importing => 0,
                  'interests-findsim' => 0,
-                 icon_renames => 0,
                  memories => 0,
                  opt_findbyemail => 1,
                  payments => 0,
@@ -155,7 +157,6 @@
                  'stats-recentupdates' => 0,
                  'stats-newjournals' => 0,
                  tellafriend => 0,
-                 esn_archive => 1,
                  );
 
     # turn $SERVER_DOWN on while you do any maintenance
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
No Subject Icon Selected
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org