I would like to have a Seaside image automatically save&quit, if it is inactive. Now, how should the inactive state be determined?
IIRC, in Seaside-2.8 you could scan the WASession instances and look at a timestamp that each instance held. The WACache stuff in Seaside-3.0 looks very different. Should I scour the WACache usage, to figure out whether the server is inactive (i.e. not handled any requests recently, or alternatively, all sessions have expired)? Or, is there some other simple way to know that the server is inactive.
"Yanni" == Yanni Chiu yanni@rogers.com writes:
Yanni> I would like to have a Seaside image automatically save&quit, if it is Yanni> inactive. Now, how should the inactive state be determined?
I'd set a timer to trigger the save and quit, and on every request, reset the timer to its full time again. Not sure where to hook it in for each request, but maybe with a bit of poking, you can find it.
2010/10/28 Randal L. Schwartz merlyn@stonehenge.com:
"Yanni" == Yanni Chiu yanni@rogers.com writes:
Yanni> I would like to have a Seaside image automatically save&quit, if it is Yanni> inactive. Now, how should the inactive state be determined?
I'd set a timer to trigger the save and quit, and on every request, reset the timer to its full time again. Not sure where to hook it in for each request, but maybe with a bit of poking, you can find it.
Wrapping a request filter around the default dispatcher should do the trick.
Cheers Philippe
On 28/10/10 10:15 AM, Philippe Marschall wrote:
2010/10/28 Randal L. Schwartzmerlyn@stonehenge.com:
> "Yanni" == Yanni Chiuyanni@rogers.com writes:
Yanni> I would like to have a Seaside image automatically save&quit, if it is Yanni> inactive. Now, how should the inactive state be determined?
I'd set a timer to trigger the save and quit, and on every request, reset the timer to its full time again. Not sure where to hook it in for each request, but maybe with a bit of poking, you can find it.
Wrapping a request filter around the default dispatcher should do the trick.
Thank you both, for the two parts of the solution. The code is attached, released under MIT license. Please add to Seaside 3.0 Addons, if it's generally useful.
Help!My application pharo crashed but I haven't closed it yet. Is it possible to save the image with the terminal.Please tell me there is a way to keep my current work...thxalex
Help!My application pharo crashed but I haven't closed it yet. Is it possible to save the image with the terminal.Please tell me there is a way to keep my current work...thxalex
You can try command + full stop that should bring up the debugger.
If that fails you can force close your image restart it and then from the menu choose Tools -> Recover lost changes. You should be able to recover your work from there. Sent via my BlackBerry from Vodacom - let your email find you!
-----Original Message----- From: Alexandre BP abalonpe@ulb.ac.be Sender: seaside-bounces@lists.squeakfoundation.org Date: Sat, 30 Oct 2010 22:03:18 To: seaside@lists.squeakfoundation.org Reply-To: Seaside - general discussion seaside@lists.squeakfoundation.org Subject: [Seaside] save image from teminal
_______________________________________________ seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
I'd never ever save an image in a sort of chrashing state.
Is far more secure (for your last changes) to choot it (just hard kill the process of that VM) and then start it again and recover changes
sebastian
On Oct 30, 2010, at 8:03 PM, Alexandre BP wrote:
Help! My application pharo crashed but I haven't closed it yet. Is it possible to save the image with the terminal. Please tell me there is a way to keep my current work... thx alex _______________________________________________ seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
seaside@lists.squeakfoundation.org