Tue Nov 4 17:50:00 PST 2008
- Next message: [Slony1-bugs] [Bug 61] reload queue when empty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://www.slony.info/bugzilla/show_bug.cgi?id=61 Summary: reload queue when empty Product: Slony-I Version: 1.1 Platform: All OS/Version: Linux Status: NEW Severity: enhancement Priority: low Component: slony_logshipper AssignedTo: slony1-bugs at lists.slony.info ReportedBy: dba at richyen.com CC: slony1-bugs at lists.slony.info Estimated Hours: 0.0 changes to make slony_logshipper re-read archive directory instead of waiting for another app/process to feed it with new archive logfiles Index: slony_logshipper.c =================================================================== --- slony_logshipper.c (revision 232) +++ slony_logshipper.c (revision 298) @@ -47,6 +47,7 @@ /* * Global data */ +int rescan_interval = 0; int parse_errors = 0; int opt_quiet = 0; char *destinationfname = NULL; @@ -134,7 +135,7 @@ * Parse commandline options * */ - while ((opt = getopt(argc, (char **)argv, "hvqcflrtTw")) != EOF) + while ((opt = getopt(argc, (char **)argv, "hvqcflrtTws:")) != EOF) { switch (opt) { @@ -178,6 +179,10 @@ case 'w': opt_nowait = 1; break; + + case 's': + rescan_interval = atoi(optarg); + break; default: fprintf(stderr, "unknown option '%c'\n", opt); @@ -365,6 +381,18 @@ if (rc == 0) break; + if (rc == -2) + { + archscan_sort = NULL; + errlog(LOG_INFO, "Queue is empty. Going to rescan in %d seconds\n", rescan_interval); + sleep(rescan_interval); + if (archscan(optind, argc, (char **)argv) < 0) + { + return -1; + } + errlog(LOG_INFO, "Archive dir scanned\n"); + continue; + } if (rc < 0) { return -1; -- Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. You are the assignee for the bug.
- Next message: [Slony1-bugs] [Bug 61] reload queue when empty
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-bugs mailing list