[Gd-chatter] r11512 - trunk/libraries/network/web-framework

hannes at gwydiondylan.org hannes at gwydiondylan.org
Tue Dec 4 06:19:42 CET 2007


Author: hannes
Date: Tue Dec  4 06:19:41 2007
New Revision: 11512

Modified:
   trunk/libraries/network/web-framework/library.dylan
   trunk/libraries/network/web-framework/storage.dylan
Log:
Job: minor
some more API functions..


Modified: trunk/libraries/network/web-framework/library.dylan
==============================================================================
--- trunk/libraries/network/web-framework/library.dylan	(original)
+++ trunk/libraries/network/web-framework/library.dylan	Tue Dec  4 06:19:41 2007
@@ -43,6 +43,8 @@
     \storage-class-definer,
     dump-data,
     dumper,
+    query-dump,
+    do-dump,
     save,
     setup,
     restore,

Modified: trunk/libraries/network/web-framework/storage.dylan
==============================================================================
--- trunk/libraries/network/web-framework/storage.dylan	(original)
+++ trunk/libraries/network/web-framework/storage.dylan	Tue Dec  4 06:19:41 2007
@@ -176,6 +176,7 @@
     *storage* := storage-root.hash-table;
     *version* := storage-root.table-version;
   end;
+  format-out("Restored %= %=\n", directory, filename);
   for (class in key-sequence(*storage*))
     setup(class);
   end for;
@@ -198,6 +199,32 @@
   end;
 end;
 
+define variable *dump?* = #f;
+
+define function query-dump ()
+  *dump?* := #t;
+end;
+
+define function do-dump ()
+  make(<thread>,
+       function: method()
+                     sleep(4);
+                     let i :: <integer> = 0;
+                     while(#t)
+                       if (i > 60)
+                         *dump?* := #t;
+                         i := 0;
+                       end;
+                       if (*dump?*)
+                         dump-data();
+                         *dump?* := #f;
+                       end;
+                       i := i + 1;
+                       sleep(60);
+                     end
+                 end);
+end;
+
 define function dumper (#key interval :: <integer> = 300, do-something :: false-or(<function>) = #f) => ()
   make(<thread>,
        function: method()



More information about the chatter mailing list