Custom collections - updating admin interface status messages

Managed by | Updated .

The REDIS status, which controls the message that is displayed in the administration interface, can be updated from a custom gatherer by using the following function calls.

The status can be controlled by calling functions that are part of the configuration object that is created when starting your custom gatherer

def config = new NoOptionsConfig(new File(args[0]), args[1]);

Set the status

public void setProgressMessage(String message)

e.g.

custom_gather.groovy
// Update the progress message for every 100 records processed
if ((i % 100) == 0)
{
    config.setProgressMessage("Processed "+i+" records");
}

Get the current status

public String getProgressMessage()

e.g.

currentState = config.setProgressMessage();

Clear the current status

public void clearProgressMessage()

e.g.

config.clearProgressMessage();
Was this artcle helpful?