From fec9e8d5fac487a636bdf235b62738a9c9c10547 Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Tue, 18 Oct 2005 04:08:12 +0000 Subject: [PATCH] Feeder: removed historical defines for PID file and lockfile. Trigger file to re-read database is now reread_db in the project root direcory, consistent with other BOINC trigger files, rather than in the tmp_project_name subdirectory. Log detection/removal of trigger file. svn path=/trunk/boinc/; revision=8696 --- checkin_notes | 8 ++++++++ sched/feeder.C | 14 ++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index 1458069d1f..7aae0e9b55 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13205,3 +13205,11 @@ Rom 17 Oct 2005 api/ graphics_api.C + +Bruce 17 Oct 2005 + - Feeder: removed historical defines for PID file and lockfile. + Trigger file to re-read database is now reread_db in the project + root direcory, consistent with other BOINC trigger files, rather + than in the tmp_project_name subdirectory. + - Log detection/removal of trigger file. + diff --git a/sched/feeder.C b/sched/feeder.C index a2754b672e..1e6f98cbc9 100644 --- a/sched/feeder.C +++ b/sched/feeder.C @@ -123,9 +123,7 @@ // //#define REMOVE_INFEASIBLE_ENTRIES -#define REREAD_DB_FILENAME "reread_db" -#define LOCKFILE "feeder.out" -#define PIDFILE "feeder.pid" +#define REREAD_DB_FILENAME "../reread_db" SCHED_CONFIG config; SCHED_SHMEM* ssp; @@ -145,11 +143,19 @@ int check_reread_trigger() { f = fopen(REREAD_DB_FILENAME, "r"); if (f) { fclose(f); + log_messages.printf( + SCHED_MSG_LOG::MSG_NORMAL, + "Found trigger file %s; re-scanning database tables.\n", + REREAD_DB_FILENAME + ); ssp->init(); ssp->scan_tables(); unlink(REREAD_DB_FILENAME); + log_messages.printf( + SCHED_MSG_LOG::MSG_NORMAL, + "Done re-scanningu: trigger file removed.\n" + ); } - return 0; }