[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] MV4: expireall script gives error
****** message to minivend-users from Mike Heins <mike@minivend.com> ******
Quoting Mark Stosberg (mark@summersault.com):
>
>
> This is a potentional bug report. :)
I think it is definitely at least a deficiency. Your report caused
me to remember I hadn't really updated the expire script for MV4 yet.
The default with MV4 is file-based sessions, not DBM, so expire is not
really the same for that. (You can still use DBM/DBI sessions if you want,
but it is not recommended.) You can expire with a cron job:
44 4 * * * find /home/you/catalogs/simple/session -type f -mtime +1 | xargs rm
>
> Running the "expireall" script that comes with minivend 4.01 returns
> this error message when I run it (with Perl 5.005_02):
>
> Undefined subroutine &main::is_retired called at
> /usr/local/mvend/lib/Vend/Session.pm line 198.
> Undefined subroutine &main::is_retired called at
> /usr/local/mvend/lib/Vend/Session.pm line 198.
>
> I'm not sure whether the sessions were actually expired or not.
>
Nope. But I put in a session expire for file-based sessions
in the next release. In Perl, it is as easy as:
$expire = $Vend::Cfg->{SessionExpire} / 86400;
$wanted = sub {
return unless -f $_ && -M _ > $expire;
push @nuke, $_;
};
require File::Find;
File::Find::find($wanted
if($opt_u) {
unlink @nuke;
}
else {
print "rm -f ";
print join "\nrm -f ", @nuke;
print "\n";
}
--
Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>
If you like what you're gettin', keep doin' what you're doin'. -- Hector
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list