Avoid magic number to make @wvu marginally happier
parent
e88c4f1587
commit
9017aa0f6b
|
@ -101,6 +101,9 @@ class Core
|
||||||
# Constant for disclosure date formatting in search functions
|
# Constant for disclosure date formatting in search functions
|
||||||
DISCLOSURE_DATE_FORMAT = "%Y-%m-%d"
|
DISCLOSURE_DATE_FORMAT = "%Y-%m-%d"
|
||||||
|
|
||||||
|
# Constant for a retry timeout on using modules before they're loaded
|
||||||
|
CMD_USE_TIMEOUT = 3
|
||||||
|
|
||||||
# Returns the list of commands supported by this command dispatcher
|
# Returns the list of commands supported by this command dispatcher
|
||||||
def commands
|
def commands
|
||||||
{
|
{
|
||||||
|
@ -2421,7 +2424,7 @@ class Core
|
||||||
mod = framework.modules.create(mod_name)
|
mod = framework.modules.create(mod_name)
|
||||||
unless mod
|
unless mod
|
||||||
# Try one more time; see #4549
|
# Try one more time; see #4549
|
||||||
sleep 3
|
sleep CMD_USE_TIMEOUT
|
||||||
mod = framework.modules.create(mod_name)
|
mod = framework.modules.create(mod_name)
|
||||||
unless mod
|
unless mod
|
||||||
print_error("Failed to load module: #{mod_name}")
|
print_error("Failed to load module: #{mod_name}")
|
||||||
|
|
Loading…
Reference in New Issue