Wed Jul 8 13:37:41 PDT 2009
- Previous message: [Slony1-commit] slony1-engine/src/slony_logshipper scan.l
- Next message: [Slony1-commit] slony1-engine RELEASE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine/src/slony_logshipper
In directory main.slony.info:/tmp/cvs-serv17840
Modified Files:
Tag: REL_1_2_STABLE
slony_logshipper.c
Log Message:
Apply change made in -r1.3 to the 1.2 branch as well
Index: slony_logshipper.c
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/src/slony_logshipper/slony_logshipper.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** slony_logshipper.c 8 Sep 2007 14:21:40 -0000 1.1.2.1
--- slony_logshipper.c 8 Jul 2009 20:37:39 -0000 1.1.2.2
***************
*** 48,51 ****
--- 48,52 ----
* Global data
*/
+ int rescan_interval = 0;
int parse_errors = 0;
int opt_quiet = 0;
***************
*** 135,139 ****
*
*/
! while ((opt = getopt(argc, (char **)argv, "hvqcflrtTw")) != EOF)
{
switch (opt)
--- 136,140 ----
*
*/
! while ((opt = getopt(argc, (char **)argv, "hvqcflrtTws:")) != EOF)
{
switch (opt)
***************
*** 179,182 ****
--- 180,187 ----
opt_nowait = 1;
break;
+
+ case 's':
+ rescan_interval = atoi(optarg);
+ break;
default:
***************
*** 312,316 ****
default: if (!opt_quiet)
! printf("logshipper deamon created - pid = %d\n",
pid);
return 0;
--- 317,321 ----
default: if (!opt_quiet)
! printf("logshipper daemon created - pid = %d\n",
pid);
return 0;
***************
*** 366,369 ****
--- 371,387 ----
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)
{
***************
*** 1173,1176 ****
--- 1191,1195 ----
" -f stay in foreground (don't daemonize)\n"
" -w enter smart shutdown mode immediately\n"
+ " -s indicate (integer value) rescan interval\n"
"\n");
exit(1);
- Previous message: [Slony1-commit] slony1-engine/src/slony_logshipper scan.l
- Next message: [Slony1-commit] slony1-engine RELEASE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list