[vhffs-dev] [778] More than one lock file is now created, it allows to run more than one robot at a time and avoid long lock time by robots which take a long time to finish . |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [778] More than one lock file is now created, it allows to run more than one robot at a time and avoid long lock time by robots which take a long time to finish .
- From: subversion@xxxxxxxxx
- Date: Mon, 27 Aug 2007 21:04:53 +0200
Revision: 778
Author: gradator
Date: 2007-08-27 19:04:52 +0000 (Mon, 27 Aug 2007)
Log Message:
-----------
More than one lock file is now created, it allows to run more than one robot at a time and avoid long lock time by robots which take a long time to finish.
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Robots.pm
trunk/vhffs-backend/conf/vhffs.conf.dist.in
trunk/vhffs-robots/src/create_cvs.pl
trunk/vhffs-robots/src/create_dns.pl
trunk/vhffs-robots/src/create_groups.pl
trunk/vhffs-robots/src/create_homes.pl
trunk/vhffs-robots/src/create_mail.pl
trunk/vhffs-robots/src/create_ml.pl
trunk/vhffs-robots/src/create_mysql.pl
trunk/vhffs-robots/src/create_pgsql.pl
trunk/vhffs-robots/src/create_repository.pl
trunk/vhffs-robots/src/create_svn.pl
trunk/vhffs-robots/src/create_viewvcconf.pl
trunk/vhffs-robots/src/create_web.pl
trunk/vhffs-robots/src/cvs_fixperms.pl
trunk/vhffs-robots/src/delete_cvs.pl
trunk/vhffs-robots/src/delete_dns.pl
trunk/vhffs-robots/src/delete_group.pl
trunk/vhffs-robots/src/delete_mail.pl
trunk/vhffs-robots/src/delete_ml.pl
trunk/vhffs-robots/src/delete_mysql.pl
trunk/vhffs-robots/src/delete_pgsql.pl
trunk/vhffs-robots/src/delete_repository.pl
trunk/vhffs-robots/src/delete_svn.pl
trunk/vhffs-robots/src/delete_users.pl
trunk/vhffs-robots/src/delete_web.pl
trunk/vhffs-robots/src/dump_mysql.pl
trunk/vhffs-robots/src/dump_pgsql.pl
trunk/vhffs-robots/src/fix_quota.pl
trunk/vhffs-robots/src/fix_quota_repository.pl
trunk/vhffs-robots/src/generate_repositorystats.pl
trunk/vhffs-robots/src/generate_webstats.pl
trunk/vhffs-robots/src/listengine_publicarchives.pl
trunk/vhffs-robots/src/mailing.pl
trunk/vhffs-robots/src/modify_mysql.pl
trunk/vhffs-robots/src/modify_pgsql.pl
trunk/vhffs-robots/src/refused_cvs.pl
trunk/vhffs-robots/src/refused_dns.pl
trunk/vhffs-robots/src/refused_groups.pl
trunk/vhffs-robots/src/refused_mail.pl
trunk/vhffs-robots/src/refused_ml.pl
trunk/vhffs-robots/src/refused_mysql.pl
trunk/vhffs-robots/src/refused_postgres.pl
trunk/vhffs-robots/src/refused_repository.pl
trunk/vhffs-robots/src/refused_svn.pl
trunk/vhffs-robots/src/refused_web.pl
trunk/vhffs-robots/src/svn_public.pl
trunk/vhffs-robots/src/svn_websvn.pl
trunk/vhffs-robots/src/update_quota_used.pl
trunk/vhffs-robots/src/update_quota_used_repository.pl
trunk/vhffs-robots/src/user_group.pl
Modified: trunk/vhffs-api/src/Vhffs/Robots.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots.pm 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-api/src/Vhffs/Robots.pm 2007-08-27 19:04:52 UTC (rev 778)
@@ -51,42 +51,29 @@
sub lock
{
my $vhffs = shift;
- my $lockfile = LOCKFILE;
- if( defined $vhffs )
- {
- if( $vhffs->get_config->use_locking == 1 )
- {
- $lockfile = $vhffs->get_config->robot_lockfile;
- if( ! defined( $lockfile ) )
- {
- $lockfile = LOCKFILE;
- }
- LockFile::Simple::lock( $lockfile ) or exit( 1 );
- }
- }
+ my $name = shift;
+ return 1 unless defined $vhffs;
+ return 1 if( $vhffs->get_config->use_locking != 1 );
+
+ my $lockfile = LOCKFILE.'.'.$name;
+ $lockfile = $vhffs->get_config->robot_lockfile.'.'.$name if( $vhffs->get_config->robot_lockfile );
+
+ LockFile::Simple::lock( $lockfile ) or exit( 1 );
return 0;
}
+
sub unlock
{
- my $vhffs;
- my $lockfile;
+ my $vhffs = shift;
+ my $name = shift;
+ return 1 unless defined $vhffs;
+ return 1 if( $vhffs->get_config->use_locking != 1 );
- $vhffs = shift;
- $lockfile = LOCKFILE;
+ my $lockfile = LOCKFILE.'.'.$name;
+ $lockfile = $vhffs->get_config->robot_lockfile.'.'.$name if( $vhffs->get_config->robot_lockfile );
- if( defined $vhffs )
- {
- if( $vhffs->get_config->use_locking == 1 )
- {
- $lockfile = $vhffs->get_config->robot_lockfile;
- if( ! defined( $lockfile ) )
- {
- $lockfile = LOCKFILE;
- }
- LockFile::Simple::unlock( $lockfile );
- }
- }
+ LockFile::Simple::unlock( $lockfile );
return 0;
}
Modified: trunk/vhffs-backend/conf/vhffs.conf.dist.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-backend/conf/vhffs.conf.dist.in 2007-08-27 19:04:52 UTC (rev 778)
@@ -325,6 +325,6 @@
#Robots should use lock file ?
#If they do, only one robot can be executed in the same-time
use_lock = yes
- lockfile = /var/lock/vhffslock
+ lockfile = /var/lock/vhffs
</robots>
Modified: trunk/vhffs-robots/src/create_cvs.pl
===================================================================
--- trunk/vhffs-robots/src/create_cvs.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_cvs.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "cvs" );
my $cvs = Vhffs::Services::Cvs::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION , undef , undef );
my $c;
@@ -56,6 +56,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "cvs" );
exit 0;
Modified: trunk/vhffs-robots/src/create_dns.pl
===================================================================
--- trunk/vhffs-robots/src/create_dns.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_dns.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -43,7 +43,7 @@
#Lock if specified in the config-file
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "dns" );
#Get all DNS objects to create
my $tocreate = Vhffs::Services::DNS::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION );
@@ -66,6 +66,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "dns" );
exit 0;
Modified: trunk/vhffs-robots/src/create_groups.pl
===================================================================
--- trunk/vhffs-robots/src/create_groups.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_groups.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "usergroup" );
my $groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION );
@@ -57,6 +57,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "usergroup" );
exit 0;
Modified: trunk/vhffs-robots/src/create_homes.pl
===================================================================
--- trunk/vhffs-robots/src/create_homes.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_homes.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "usergroup" );
my $users = Vhffs::User::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION , undef , undef );
my $user;
@@ -56,7 +56,7 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "usergroup" );
exit 0;
Modified: trunk/vhffs-robots/src/create_mail.pl
===================================================================
--- trunk/vhffs-robots/src/create_mail.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_mail.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -42,7 +42,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "mail" );
my $mails = Vhffs::Services::Mail::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION );
my $m;
@@ -62,7 +62,7 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mail" );
exit 0;
Modified: trunk/vhffs-robots/src/create_ml.pl
===================================================================
--- trunk/vhffs-robots/src/create_ml.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_ml.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -38,7 +38,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "ml" );
my $mls = Vhffs::Services::Mailing::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION );
my $ml;
@@ -58,7 +58,7 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "ml" );
exit 0;
Modified: trunk/vhffs-robots/src/create_mysql.pl
===================================================================
--- trunk/vhffs-robots/src/create_mysql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_mysql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -42,7 +42,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "mysql" );
my $dbs = Vhffs::Services::Mysql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION , undef , undef );
my $db;
@@ -62,5 +62,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mysql" );
exit 0;
Modified: trunk/vhffs-robots/src/create_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/create_pgsql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_pgsql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -38,7 +38,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "pgsql" );
my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION );
my $db;
@@ -56,5 +56,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "pgsql" );
exit( 0 );
Modified: trunk/vhffs-robots/src/create_repository.pl
===================================================================
--- trunk/vhffs-robots/src/create_repository.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_repository.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "repository" );
my $repos = Vhffs::Services::Repository::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION , undef , undef );
my $repo;
@@ -56,6 +56,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "repository" );
exit 0;
Modified: trunk/vhffs-robots/src/create_svn.pl
===================================================================
--- trunk/vhffs-robots/src/create_svn.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_svn.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "svn" );
my $repos = Vhffs::Services::Svn::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION);
my $svn;
@@ -54,5 +54,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "svn" );
exit 0;
Modified: trunk/vhffs-robots/src/create_viewvcconf.pl
===================================================================
--- trunk/vhffs-robots/src/create_viewvcconf.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_viewvcconf.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -42,6 +42,8 @@
my $vhffs = init Vhffs::Main;
+Vhffs::Robots::lock( $vhffs , "viewvcconf" );
+
my $confdir = $vhffs->get_config->get_datadir . "/conf/";
mkdir( $confdir ) if( ! -d $confdir );
@@ -89,3 +91,5 @@
open( OUTPUT , ">$ouputfile" );
print OUTPUT $template->output;
close( OUTPUT );
+
+Vhffs::Robots::unlock( $vhffs , "viewvcconf" );
Modified: trunk/vhffs-robots/src/create_web.pl
===================================================================
--- trunk/vhffs-robots/src/create_web.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/create_web.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "web" );
my $webs = Vhffs::Services::Httpd::getall( $vhffs , Vhffs::Constants::WAITING_FOR_CREATION , undef, undef );
my $web;
@@ -56,7 +56,7 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "web" );
exit 0;
Modified: trunk/vhffs-robots/src/cvs_fixperms.pl
===================================================================
--- trunk/vhffs-robots/src/cvs_fixperms.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/cvs_fixperms.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -48,7 +48,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "cvs" );
my $cvss = Vhffs::Services::Cvs::getall( $vhffs , Vhffs::Constants::WAITING_FOR_MODIFICATION );
my $cvs;
@@ -105,6 +105,6 @@
$cvs->commit;
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "cvs" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_cvs.pl
===================================================================
--- trunk/vhffs-robots/src/delete_cvs.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_cvs.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -40,7 +40,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "cvs" );
my $lol = Vhffs::Services::Cvs::getall( $vhffs , Vhffs::Constants::TO_DELETE );
my $cvs;
@@ -61,6 +61,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "cvs" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_dns.pl
===================================================================
--- trunk/vhffs-robots/src/delete_dns.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_dns.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "dns" );
my $dns;
my $todelete = Vhffs::Services::DNS::getall( $vhffs , Vhffs::Constants::TO_DELETE );
@@ -60,6 +60,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "dns" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_group.pl
===================================================================
--- trunk/vhffs-robots/src/delete_group.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_group.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -48,7 +48,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "usergroup" );
my $groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::TO_DELETE );
my $group;
@@ -151,7 +151,7 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "usergroup" );
exit( 0 );
Modified: trunk/vhffs-robots/src/delete_mail.pl
===================================================================
--- trunk/vhffs-robots/src/delete_mail.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_mail.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -41,7 +41,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "mail" );
my $mails = Vhffs::Services::Mail::getall( $vhffs , Vhffs::Constants::TO_DELETE );
my $mail;
@@ -62,6 +62,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mail" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_ml.pl
===================================================================
--- trunk/vhffs-robots/src/delete_ml.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_ml.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -38,7 +38,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "ml" );
my $mls = Vhffs::Services::Mailing::getall( $vhffs , Vhffs::Constants::TO_DELETE );
my $ml;
@@ -54,6 +54,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "ml" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_mysql.pl
===================================================================
--- trunk/vhffs-robots/src/delete_mysql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_mysql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -38,7 +38,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "mysql" );
my $dbs = Vhffs::Services::Mysql::getall( $vhffs , Vhffs::Constants::TO_DELETE , undef , undef );
my $db;
@@ -57,6 +57,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mysql" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/delete_pgsql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_pgsql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -37,7 +37,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "pgsql" );
my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::TO_DELETE , undef , undef );
my $db;
@@ -55,7 +55,7 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "pgsql" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_repository.pl
===================================================================
--- trunk/vhffs-robots/src/delete_repository.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_repository.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -40,7 +40,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "repository" );
my $repos = Vhffs::Services::Repository::getall( $vhffs , Vhffs::Constants::TO_DELETE );
my $repo;
@@ -70,6 +70,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "repository" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_svn.pl
===================================================================
--- trunk/vhffs-robots/src/delete_svn.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_svn.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "svn" );
my $repos = Vhffs::Services::Svn::getall( $vhffs , Vhffs::Constants::TO_DELETE);
my $svn;
@@ -58,5 +58,5 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "svn" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_users.pl
===================================================================
--- trunk/vhffs-robots/src/delete_users.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_users.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "usergroup" );
my $lol = Vhffs::User::getall( $vhffs , Vhffs::Constants::TO_DELETE );
my $user;
@@ -94,5 +94,5 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "usergroup" );
exit 0;
Modified: trunk/vhffs-robots/src/delete_web.pl
===================================================================
--- trunk/vhffs-robots/src/delete_web.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/delete_web.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "web" );
my $webs = Vhffs::Services::Httpd::getall( $vhffs , Vhffs::Constants::TO_DELETE );
my $web;
@@ -58,5 +58,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "web" );
exit 0;
Modified: trunk/vhffs-robots/src/dump_mysql.pl
===================================================================
--- trunk/vhffs-robots/src/dump_mysql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/dump_mysql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -45,7 +45,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "dumpmysql" );
my $objs = Vhffs::Services::Mysql::getall( $vhffs );
my $admin_dbuser = $vhffs->get_config->get_mysql_admin_username;
@@ -80,6 +80,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "dumpmysql" );
exit 0;
Modified: trunk/vhffs-robots/src/dump_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/dump_pgsql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/dump_pgsql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -45,7 +45,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "dumppgsql" );
my $objs = Vhffs::Services::Postgres::getall( $vhffs );
my $admin_dbuser = $vhffs->get_config->get_pgsql_admin_username;
@@ -81,6 +81,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "dumppgsql" );
exit 0;
Modified: trunk/vhffs-robots/src/fix_quota.pl
===================================================================
--- trunk/vhffs-robots/src/fix_quota.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/fix_quota.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -43,7 +43,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "setquota" );
my $groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::ACTIVATED );
my $group;
@@ -85,6 +85,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "setquota" );
exit 0;
Modified: trunk/vhffs-robots/src/fix_quota_repository.pl
===================================================================
--- trunk/vhffs-robots/src/fix_quota_repository.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/fix_quota_repository.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -43,7 +43,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "setquotarepository" );
my $groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::ACTIVATED );
my $group;
@@ -114,6 +114,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "setquotarepository" );
exit 0;
Modified: trunk/vhffs-robots/src/generate_repositorystats.pl
===================================================================
--- trunk/vhffs-robots/src/generate_repositorystats.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/generate_repositorystats.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -70,6 +70,8 @@
die "ERROR: cannot find the awstat sample at ".$awstats_sample if( ! -f $awstats_sample );
die "ERROR: cannot find the apache2ctl binary at ".$log_apachectl if( $log_apachelocal && ! -f $log_apachectl );
+Vhffs::Robots::lock( $vhffs , "repositorystats" );
+
my %repositorys;
foreach ( @{$repos} ) {
$repositorys{$_->get_name} = 1;
@@ -243,3 +245,5 @@
# Rotate logs for this website
Vhffs::Functions::rotate_log( $logpath , $log_parsed_rotation , $log_parsed_compress );
}
+
+Vhffs::Robots::unlock( $vhffs , "repositorystats" );
Modified: trunk/vhffs-robots/src/generate_webstats.pl
===================================================================
--- trunk/vhffs-robots/src/generate_webstats.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/generate_webstats.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -69,6 +69,8 @@
die "ERROR: cannot find the awstat sample at ".$awstats_sample if( ! -f $awstats_sample );
die "ERROR: cannot find the apache2ctl binary at ".$log_apachectl if( $log_apachelocal && ! -f $log_apachectl );
+Vhffs::Robots::lock( $vhffs , "webstats" );
+
my %websites;
foreach ( @{$webs} ) {
$websites{$_->get_servername} = 1;
@@ -211,3 +213,5 @@
# Rotate logs for this website
Vhffs::Functions::rotate_log( $logpath , $log_parsed_rotation , $log_parsed_compress );
}
+
+Vhffs::Robots::unlock( $vhffs , "webstats" );
Modified: trunk/vhffs-robots/src/listengine_publicarchives.pl
===================================================================
--- trunk/vhffs-robots/src/listengine_publicarchives.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/listengine_publicarchives.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,6 +39,8 @@
mkdir($outputdir, 0755);
die "Cannot create ".$outputdir." directory\n" unless( -d $outputdir );
+Vhffs::Robots::lock( $vhffs , "listenginearchives" );
+
my $lists = Vhffs::Services::Mailing::getall( $vhffs , Vhffs::Constants::ACTIVATED , undef );
foreach my $list ( @{$lists} )
{
@@ -155,3 +157,5 @@
closedir( LISTDIR );
}
+
+Vhffs::Robots::unlock( $vhffs , "listenginearchives" );
Modified: trunk/vhffs-robots/src/mailing.pl
===================================================================
--- trunk/vhffs-robots/src/mailing.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/mailing.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -51,60 +51,38 @@
use Vhffs::Robots;
use Vhffs::Constants;
-
-my $users;
-my $user;
-my $name;
-my $idm;
my $vhffs = init Vhffs::Main;
+exit 1 unless defined $vhffs;
-Vhffs::Robots::lock( $vhffs );
-
my $mailings = Vhffs::Robots::Mailing::getall_mailings( $vhffs );
-my $from;
-my $message;
-my $subject;
-my $tmp;
+exit 0 unless defined $mailings;
+my $from = $vhffs->get_config->get_master_mail;
+die "Cannot send mailing, From: (master mail) is not declared in config file" unless $from;
-$from = $vhffs->get_config->get_master_mail;
+Vhffs::Robots::lock( $vhffs , "mailings" );
-if( ! defined $from )
-{
- Vhffs::Robots::vhffs_log( "Cannot send mailing, from (master mail) is not declared in config file" , $vhffs);
- Vhffs::Robots::unlock( $vhffs );
- exit( -1 );
-}
+my $users = Vhffs::User::getall( $vhffs , undef );
-if( defined $mailings )
+foreach my $idm ( keys %{$mailings} )
{
- $users = Vhffs::User::getall( $vhffs , undef );
+ next unless defined $mailings->{$idm}{message};
+ next unless defined $mailings->{$idm}{subject};
- #Exit if no users are present
- exit( 1 ) if( ! ( defined( $users ) ) );
+ my $subject = Vhffs::Functions::stripslashes( $mailings->{$idm}{subject} );
+ my $message = Vhffs::Functions::stripslashes( $mailings->{$idm}{message} );
- foreach $idm ( keys %{$mailings} )
+ foreach my $user ( @{$users} )
{
- next if( ! defined $mailings->{$idm}{message} );
- next if( ! defined $mailings->{$idm}{subject} );
-
- my $query = "UPDATE vhffs_mailings SET state='".Vhffs::Constants::ACTIVATED."' WHERE id_mailing='".$idm."'";
- my $request = $vhffs->get_db_object->prepare( $query );
- $request->execute or print ( "error" );
-
- $subject = Vhffs::Functions::stripslashes( $mailings->{$idm}{subject} );
- $message = Vhffs::Functions::stripslashes( $mailings->{$idm}{message} );
-
-
- foreach $user ( @{$users} )
- {
- next if( ! defined( $user ) );
-
- Vhffs::Functions::send_mail( $from , $user->get_mail , $subject , $message , $vhffs );
- }
+ next unless defined $user;
+ Vhffs::Functions::send_mail( $from , $user->get_mail , $subject , $message , $vhffs );
}
+
+ my $query = "UPDATE vhffs_mailings SET state='".Vhffs::Constants::ACTIVATED."' WHERE id_mailing='".$idm."'";
+ my $request = $vhffs->get_db_object->prepare( $query );
+ $request->execute or print ( "error" );
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mailings" );
exit( 0 );
Modified: trunk/vhffs-robots/src/modify_mysql.pl
===================================================================
--- trunk/vhffs-robots/src/modify_mysql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/modify_mysql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "mysql" );
my $dbs = Vhffs::Services::Mysql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_MODIFICATION , undef , undef );
my $db;
@@ -56,6 +56,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mysql" );
exit 0;
Modified: trunk/vhffs-robots/src/modify_pgsql.pl
===================================================================
--- trunk/vhffs-robots/src/modify_pgsql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/modify_pgsql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "pgsql" );
my $dbs = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::WAITING_FOR_MODIFICATION , undef , undef );
my $db;
@@ -49,6 +49,6 @@
Vhffs::Robots::Postgres::update_db( $vhffs , $db );
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "pgsql" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_cvs.pl
===================================================================
--- trunk/vhffs-robots/src/refused_cvs.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_cvs.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -53,7 +53,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs "cvs" );
$objects = Vhffs::Services::Cvs::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -83,5 +83,5 @@
$object->delete;
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "cvs" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_dns.pl
===================================================================
--- trunk/vhffs-robots/src/refused_dns.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_dns.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -52,7 +52,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "dns" );
$objects = Vhffs::Services::DNS::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -88,5 +88,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "dns" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_groups.pl
===================================================================
--- trunk/vhffs-robots/src/refused_groups.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_groups.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -52,7 +52,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "usergroup" );
$objects = Vhffs::Group::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -83,5 +83,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "usergroup" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_mail.pl
===================================================================
--- trunk/vhffs-robots/src/refused_mail.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_mail.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -52,7 +52,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "mail" );
$objects = Vhffs::Services::Mail::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -88,5 +88,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mail" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_ml.pl
===================================================================
--- trunk/vhffs-robots/src/refused_ml.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_ml.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -52,7 +52,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "ml" );
$objects = Vhffs::Services::Mailing::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -84,5 +84,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "ml" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_mysql.pl
===================================================================
--- trunk/vhffs-robots/src/refused_mysql.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_mysql.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -23,7 +23,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "mysql" );
$objects = Vhffs::Services::Mysql::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -60,5 +60,5 @@
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "mysql" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_postgres.pl
===================================================================
--- trunk/vhffs-robots/src/refused_postgres.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_postgres.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -52,7 +52,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "pgsql" );
$objects = Vhffs::Services::Postgres::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -89,6 +89,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "pgsql" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_repository.pl
===================================================================
--- trunk/vhffs-robots/src/refused_repository.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_repository.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -53,7 +53,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "repository" );
$objects = Vhffs::Services::Repository::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -88,5 +88,5 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "repository" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_svn.pl
===================================================================
--- trunk/vhffs-robots/src/refused_svn.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_svn.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -23,7 +23,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "svn" );
$objects = Vhffs::Services::Svn::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -54,6 +54,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "svn" );
exit 0;
Modified: trunk/vhffs-robots/src/refused_web.pl
===================================================================
--- trunk/vhffs-robots/src/refused_web.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/refused_web.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -52,7 +52,7 @@
$vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "web" );
$objects = Vhffs::Services::Httpd::getall( $vhffs , Vhffs::Constants::VALIDATION_REFUSED );
bindtextdomain("vhffs", $vhffs->get_config->get_intldir);
@@ -83,5 +83,5 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "web" );
exit 0;
Modified: trunk/vhffs-robots/src/svn_public.pl
===================================================================
--- trunk/vhffs-robots/src/svn_public.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/svn_public.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -39,7 +39,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "svn" );
my $repos = Vhffs::Services::Svn::getall( $vhffs , Vhffs::Constants::WAITING_FOR_MODIFICATION );
my $svn;
@@ -72,6 +72,6 @@
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "svn" );
exit 0;
Modified: trunk/vhffs-robots/src/svn_websvn.pl
===================================================================
--- trunk/vhffs-robots/src/svn_websvn.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/svn_websvn.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -37,6 +37,9 @@
use Vhffs::Services::Svn;
my $vhffs = init Vhffs::Main;
+
+Vhffs::Robots::lock( $vhffs , "websvn" );
+
my $svnss = Vhffs::Services::Svn::getall( $vhffs , Vhffs::Constants::ACTIVATED );
my $svn;
my $svnconfdir = $vhffs->get_config->get_datadir . "/svn/conf/";
@@ -58,3 +61,6 @@
print FILE "\$config->setSedPath(\"/bin\");\n";
print FILE "?>\n";
close( FILE );
+
+Vhffs::Robots::unlock( $vhffs , "websvn" );
+
Modified: trunk/vhffs-robots/src/update_quota_used.pl
===================================================================
--- trunk/vhffs-robots/src/update_quota_used.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/update_quota_used.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -43,7 +43,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "getquota" );
my $groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::ACTIVATED );
my $group;
@@ -64,6 +64,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "getquota" );
exit 0;
Modified: trunk/vhffs-robots/src/update_quota_used_repository.pl
===================================================================
--- trunk/vhffs-robots/src/update_quota_used_repository.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/update_quota_used_repository.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -43,7 +43,7 @@
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "getquotarepository" );
my $groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::ACTIVATED );
my $group;
@@ -79,6 +79,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "getquotarepository" );
exit 0;
Modified: trunk/vhffs-robots/src/user_group.pl
===================================================================
--- trunk/vhffs-robots/src/user_group.pl 2007-08-27 14:48:57 UTC (rev 777)
+++ trunk/vhffs-robots/src/user_group.pl 2007-08-27 19:04:52 UTC (rev 778)
@@ -43,7 +43,7 @@
my $name;
my $vhffs = init Vhffs::Main;
-Vhffs::Robots::lock( $vhffs );
+Vhffs::Robots::lock( $vhffs , "usergroup" );
my $joins = Vhffs::Robots::Group::getall_user_group_to_create( $vhffs );
@@ -96,6 +96,6 @@
}
}
-Vhffs::Robots::unlock( $vhffs );
+Vhffs::Robots::unlock( $vhffs , "usergroup" );
exit 0;