Recovering Metadata
The Recording Processor Script installation package provides an additional script that when run will recover recordings from Recording Processor's failed folder and repost the recordings to Web Services and SpeechMiner.
Before you start, you must have the following prerequisites:
- Recording Processor Script version 8.5.xxx.xx
- Python 2.7 or higher
- Admin username and password with read and writer permissions on the folder where the script resides.
Recovering the Failed Folder
After you have installed the Recording Processor Script, you can find the recover_failedfolder.py recovery script in the <RP_INSTALL_DIR>/scripts/ directory.
From the command line on the machine where the Recording Processor Script is installed and running, execute the following command:
python recover_meta_from_rp_failedfolder.py -failFolder "C:\<Installation Directory>\RP\failed" -htccUri http://<Web Services IP Address>:<Web Services Port> -opsUser <User Name> -opsPass <Password> -sleepMs 30
To return the details of the parameters used, run the following command:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -h
This command will return the following results:
usage: recover_failedfolder.py [-h] -failFolder FAILFOLDER [-htccUri HTCCURI]
[-sleepMs SLEEPMS]
[-rp.speechminer.uri SPEECHMINERURI]
[-deleteOnRecovered] [-defaultCCID DEFAULTCCID]
Recover RP failed folder
optional arguments:
-h, --help show this help message and exit
-failFolder FAILFOLDER
path to rp fail folder
-htccUri HTCCURI htcc prefix. e.g. http://gws-elb.genesyscloud.com
-sleepMs SLEEPMS miliseconds sleep after each recording is processed
-rp.speechminer.uri SPEECHMINERURI
speechMiner IR Uri, if provided, it will override
values in metadata
-deleteOnRecovered
-defaultCCID DEFAULTCCID
default CCID for recordings in folder unknownCCID
Examples
If the configuration is correct and Recording Process Script failed to post recordings because of network problems, the following example will recover the recordings:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -failFolder ..\failed -htccUri http://<Web Services URI> -opsUser <User Name> -opsPass <Password>
If Recording Processor Scripted failed to post recordings because the wrong SpeechMiner URI was provided, the following example will recover the recordings:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -failFolder ..\failed -htccUri http://<Web Services URI> -sleepMs 20 -rp.speechminer.uri http://<SpeechMiner URI>/interationreceiver -defaultCCID 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc Please enter htcc ops username: ops Please enter htcc ops password: ops Please enter rp.speechminer.auth (e.g. rp_user:123455): rpUser:123456 ...
If Recording Processor Script failed to post recordings because the CCID is invalid, the recordings are saved in the unknownCCID folder. Use the following script to recover those recordings in the unknownCCID folder:
C:\<Installation Directory>\scripts>python recover_failedfolder.py -failFolder ..\failed -htccUri http://<Web Services URI> -sleepMs 20 -rp.speechminer.uri http://<SpeechMiner URI>/interationreceiver -defaultCCID 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc Please enter htcc ops username: ops Please enter htcc ops password: ops Please enter rp.speechminer.auth (e.g. rp_user:123455): rpUser:123456 ...
Logging
The script will provide audit log in recoverFailedFolder_<executiong-time>/results.log
