summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb4c94c)
raw | patch | inline | side by side (parent: eb4c94c)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 31 Mar 2008 15:21:50 +0000 (15:21 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 31 Mar 2008 15:21:50 +0000 (15:21 +0000) |
Removed lock files when starting server.
Increased sleep time when waiting for lock.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10095 594d385d-05f5-0310-b6e9-bd551577e9d8
Increased sleep time when waiting for lock.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10095 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/modules/DBsqlite.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 507c833c779a87baebcb241844c29db112325207..893ccfb3656f2e10c4df5f1adea880c4bf6a6cad 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
$bus_activ = "false"
}
-
-
-# delete old DBsqlite lock files
-#unlink('/tmp/gosa_si_lock*');
-
# connect to gosa-si job queue
+unlink($job_queue_file_name.".si.lock");
$job_db = GOSA::DBsqlite->new($job_queue_file_name);
$job_db->create_table($job_queue_tn, \@job_queue_col_names);
# connect to known_clients_db
+unlink($known_clients_file_name.".si.lock");
$known_clients_db = GOSA::DBsqlite->new($known_clients_file_name);
$known_clients_db->create_table($known_clients_tn, \@known_clients_col_names);
# connect to known_server_db
+unlink($known_server_file_name.".si.lock");
$known_server_db = GOSA::DBsqlite->new($known_server_file_name);
$known_server_db->create_table($known_server_tn, \@known_server_col_names);
# connect to login_usr_db
+unlink($login_users_file_name.".si.lock");
$login_users_db = GOSA::DBsqlite->new($login_users_file_name);
$login_users_db->create_table($login_users_tn, \@login_users_col_names);
# connect to fai_server_db and fai_release_db
+unlink($fai_server_file_name.".si.lock");
$fai_server_db = GOSA::DBsqlite->new($fai_server_file_name);
$fai_server_db->create_table($fai_server_tn, \@fai_server_col_names);
$fai_server_db->create_table($fai_release_tn, \@fai_release_col_names);
# connect to packages_list_db
+unlink($packages_list_file_name.".si.lock");
unlink($packages_list_file_name);
$packages_list_db = GOSA::DBsqlite->new($packages_list_file_name);
$packages_list_db->create_table($packages_list_tn, \@packages_list_col_names);
# connect to messaging_db
+unlink($messaging_file_name.".si.lock");
$messaging_db = GOSA::DBsqlite->new($messaging_file_name);
$messaging_db->create_table($messaging_tn, \@messaging_col_names);
index 8eba13d478cf28edeaadfc914db033ef716cfda2..06f2d0e0efbeb49f8e2125b1cdc7b6b4ee574215 100644 (file)
my $class = shift;
my $db_name = shift;
- my $lock = $db_name.".lock";
+ my $lock = $db_name.".si.lock";
# delete existing lock - instance should be running only once
if(stat($lock)) {
unlink($lock);
my $result=(-f $lock);
if($result) {
#&main::daemon_log("(".((defined $funcname)?$funcname:"").") Lock (PID ".$$.") $lock found", 8);
- usleep 100;
+ usleep 500;
}
return $result;
}