--max-sleep argument broken

Bug #1745001 reported by Josh Stompro
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Fix Released

Bug Description

EG 2.8-3.0

I just tried to make use of the --max-sleep argument to reduce the amount of time the waits before giving up when it detects a lock file. The goal being to avoid having 20+ scripts running for a cron task that runs every 5 minutes when there is a system issue that prevents the first one from finishing. --help shows the following info.
        When in process-hooks mode, wait up to <seconds> for the lock file to
        go away. Defaults to 3600 (1 hour).

But I found that when I use the --max-sleep=90 I get the following error message.

Option max-sleep does not take an argument Error in command line arguments! at /openils/bin/ line 44.

I think the issue is that the max-sleep option is entered has just being a flag.

  44 GetOptions(
  45 'max-sleep' => \$opt_max_sleep,
  46 'osrf-config=s' => \$opt_osrf_config,
  47 'run-pending' => \$opt_run_pending,
  48 'hooks=s' => \$opt_hooks,
  49 'granularity=s' => \$opt_granularity,
  50 'granularity-only' => \$opt_gran_only,
  51 'process-hooks' => \$opt_process_hooks,
  52 'debug-stdout' => \$opt_debug_stdout,
  53 'custom-filters=s' => \$opt_custom_filter,
  54 'lock-file=s' => \$opt_lockfile,
  55 'verbose' => \$opt_verbose,
  56 'help' => \$opt_help,
  57 );

There is no =i after 'max-sleep above. I think that adding =i will allow an integer value for that option.

working branch coming soon.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :
tags: added: pullrequest
Revision history for this message
Cesar V (cesardv) wrote :

Nice... max-sleep now works for me Josh, thanks.
Signed-off branch to follow...

I was wondering though whether the processed/"sample" Open-ILS/src/support-scripts/ be un-ignored, updated/committed, and re-ignored, so that it matches the .in one? Not sure what the protocol should be there...

Cesar V (cesardv)
tags: added: signedoff
Galen Charlton (gmc)
Changed in evergreen:
milestone: none → 3.1.1
status: New → Confirmed
importance: Undecided → Low
Changed in evergreen:
milestone: 3.1.1 → 3.1.2
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master, rel_3_1, and rel_3_0. Thanks, Josh and Cesar!

Cesar: to answer your question, generated files like should not be checked in.

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Galen Charlton (gmc) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers