mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Mass_parse: Do not return null if MACHINENAME / HOSTNAME is not available
This commit is contained in:
parent
69b5678350
commit
9f2863c953
@ -48,10 +48,10 @@ public class System_ {
|
||||
|
||||
// *** environment variables: getenv
|
||||
public static String Env__machine_name() {
|
||||
String rv = "UNKNOWN_MACHINE_NAME";
|
||||
String rv = "";
|
||||
rv = Env__get(Env_key__computername); if (String_.Len_gt_0(rv)) return rv;
|
||||
rv = Env__get(Env_key__hostname); if (String_.Len_gt_0(rv)) return rv;
|
||||
return rv;
|
||||
return "UNKNOWN_MACHINE_NAME";
|
||||
}
|
||||
private static String Env__get(String key) {
|
||||
return System.getenv(key);
|
||||
|
@ -35,7 +35,7 @@ public class Xomp_parse_mgr_cfg implements Gfo_invk {
|
||||
public Io_url Mgr_url() {return mgr_url;} private Io_url mgr_url;
|
||||
public String Wkr_machine_name() {return wkr_machine_name;} private String wkr_machine_name;
|
||||
public boolean Show_msg__fetched_pool() {return show_msg__fetched_pool;} private boolean show_msg__fetched_pool;
|
||||
public void Init(Xowe_wiki wiki) {
|
||||
public void Init1(Xowe_wiki wiki) {
|
||||
if (num_wkrs == -1) num_wkrs = gplx.core.envs.Runtime_.Cpu_count();
|
||||
if (num_pages_in_pool == -1) num_pages_in_pool = num_wkrs * 1000;
|
||||
if (mgr_url == null) mgr_url = wiki.Fsys_mgr().Root_dir().GenSubDir_nest("tmp", "xomp");
|
||||
|
Loading…
Reference in New Issue
Block a user