private void Download_itm(Xodb_tbl_oimg_xfer_itm fsdb) {
   try {
     tier_id_val = fsdb.Lnki_tier_id();
     page_id_val = fsdb.Lnki_page_id();
     lnki_id_val = fsdb.Lnki_id();
     fsdb.Orig_repo_name_(
         fsdb.Orig_repo_id() == Xof_repo_tid_.Tid__local
             ? wiki.Domain_bry()
             : Xow_domain_itm_.Bry__commons);
     Download_exec(fsdb);
     ++exec_count;
     if (exec_count % progress_interval == 0) Print_progress(fsdb);
     if (exec_count % poll_interval == 0) poll_mgr.Poll();
     if (exec_count % commit_interval == 0) Txn_sav();
     if (exec_count % delete_interval == 0) Delete_files();
   } catch (Exception exc) {
     ++exec_fail;
     usr_dlg.Warn_many(
         "",
         "",
         "download error; ttl=~{0} w=~{1} err=~{2}",
         fsdb.Orig_ttl(),
         fsdb.Lnki_w(),
         Err_.Message_gplx_full(exc));
   }
 }
 public static Fsdb_db_mgr new_src_bin_db_mgr(Xow_wiki wiki, String version) {
   String domain_str = wiki.Domain_str();
   Fsdb_db_mgr rv = null;
   Io_url url = null;
   if (String_.Eq(version, "v1")) {
     url =
         wiki.Fsys_mgr()
             .File_dir()
             .OwnerDir()
             .GenSubDir(domain_str + "-prv"); // v1: EX: /xowa/file/en.wikipedia.org-prv/
     rv = new Fsdb_db_mgr__v1(url);
   } else if (String_.Eq(version, "v2")) {
     url = wiki.Fsys_mgr().Root_dir().GenSubDir("prv"); // v2: EX: /xowa/wiki/en.wikipedia.org/prv/
     rv = Fsdb_db_mgr_.new_detect(wiki, url, url); // note that v2 is prioritized over v1
   } else throw Err_.new_wo_type("fsdb.make:unknown fsdb_type", "version", version);
   if (rv == null)
     throw Err_.new_wo_type(
         "fsdb.make:source fsdb not found", "version", version, "url", url.Raw());
   return rv;
 }
Exemple #3
0
 public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
   throw Err_.new_unimplemented_w_msg("implemented for Xoa_cfg_mgr");
 }