Skip to content

Commit 17d6a70

Browse files
authored
Merge pull request #55 from YanChii/timeout_fix
Timeout units fix for gh issue #54
2 parents 2263c9d + 001a2f6 commit 17d6a70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

script/pgsqlms

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ my $exit_code = 0;
7878
# Returns timeout as integer
7979
# undef if unknown
8080
sub _get_action_timeout {
81-
my $timeout = $ENV{'OCF_RESKEY_CRM_meta_timeout'};
81+
my $timeout = $ENV{'OCF_RESKEY_CRM_meta_timeout'} / 1000;
8282

8383
ocf_log( 'debug', sprintf '_get_action_timeout: known timeout: %s',
8484
defined $timeout ? $timeout : 'undef' );
@@ -392,7 +392,7 @@ sub _create_recovery_conf {
392392
}
393393

394394
# Use pg_controldata to check the state of the PostgreSQL server. This
395-
# function returns codes depending on this state, so we can find wether the
395+
# function returns codes depending on this state, so we can find whether the
396396
# instance is a primary or a secondary, or use it to detect any inconsistency
397397
# that could indicate the instance has crashed.
398398
#
@@ -1037,7 +1037,7 @@ sub pgsql_validate_all {
10371037

10381038
# check recovery template
10391039
if ( ! -f $recovery_tpl ) {
1040-
ocf_log( 'crit', sprintf 'Recovery template file "%s" does not exists',
1040+
ocf_log( 'crit', sprintf 'Recovery template file "%s" does not exist',
10411041
$recovery_tpl );
10421042
exit $OCF_ERR_ARGS;
10431043
}

0 commit comments

Comments
 (0)