Move getBaseUrl
This commit is contained in:
@ -9,10 +9,11 @@ use Hydra::Helper::CatalystUtils;
|
||||
use Hydra::Model::DB;
|
||||
use Nix::Store;
|
||||
use Encode;
|
||||
use Sys::Hostname::Long;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(
|
||||
getHydraHome getHydraConfig txn_do
|
||||
getHydraHome getHydraConfig getBaseUrl txn_do
|
||||
getSCMCacheDir
|
||||
registerRoot getGCRootsDir gcRootFor
|
||||
jobsetOverview jobsetOverview_
|
||||
@ -39,6 +40,12 @@ sub getHydraConfig {
|
||||
}
|
||||
|
||||
|
||||
sub getBaseUrl {
|
||||
my ($config) = @_;
|
||||
return $config->{'base_uri'} // "http://" . hostname_long . ":3000";
|
||||
}
|
||||
|
||||
|
||||
# Awful hack to handle timeouts in SQLite: just retry the transaction.
|
||||
# DBD::SQLite *has* a 30 second retry window, but apparently it
|
||||
# doesn't work.
|
||||
|
Reference in New Issue
Block a user