Fix Script in background: Progress worker state is not set to complete after worker is finished message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 12:12 PM
Has anyone received the error, Progress worker state is not set to complete after worker is finished, when running a Fix Script in the background?
I'm receiving this error and the state remains in Running but I know my script completes because of a log message I have at the end of the script displays in the Log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 12:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 12:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 12:28 PM
your screenshot is broken can you attach it again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 12:28 PM
Here is the Fix Script. Nothing too complex.
var testTemplate = '197701c71b945550e5c7c9d6624bcb89';
try {
var dmu = new DataMigrationUtil(testTemplate);
// dmu.cleanUp();
dmu.configureConnection();
var arrCustomerIDs = ['<TEST CUSTOMER ID>'];
// For each customer listed, transfer its records
for (var i = 0, len = arrCustomerIDs.length; i < len; i++ ) {
var customerID = arrCustomerIDs[i];
dmu.cleanUp(); // erase the Transferred IDs field for all Instance Data Table records
dmu.startTransfer(customerID); // loops through each active Instance Data Table record, passing in the testCustomerID
gs.sleep(2000);
}
gs.log("[" + new Date().toISOString().slice(0, 23).replace("T", " ") + "] Migration complete", "data_migration");
} catch (e) {
var prefix = "[" + new Date().toISOString().slice(0, 23).replace("T", " ") + "] ";
gs.log(prefix + e, 'data_migration_error');
}