Script to flush store and forward

Is there a way by script to flush the store and forward quarantine data (as we can manually do with the gateway web page)

You can, but you’ll need a module to get access to the gateway context (in any semi-sanctioned way, that is)
From GatewayContext, get the history manager with context.getHistoryManager(), then getQuarantinedDataInfo(<storeName>); then get the ID from each quarantined item.
Then from the history manager, call deleteQuarantinedData(<storeName>, <idsToDelete>).

1 Like
name = "ignition"
if not initialChange:
	from com.inductiveautomation.ignition.gateway import SRContext
	from java.lang import Long
	context = SRContext.get()
	qi = [Long( for qdi in context.historyManager.getQuarantinedDataInfo(name)]

Quick example of how you could do this. This has to run from the gateway.