OpenWGA 7.10 - TMLScript reference

JobContext
Method :

dbUpdated(db)

On object JobContext
Usage Inform the job runner about db-updates
Description

If a job updates a lot of contents the job gets slower and slower ...

You can avoid this by maintaining some OpenWGA internal data structure every x content updates. F. e. you may call db().sessionContext.clearCache() from time to time.

Exatly this is done by calling jobContext.dbUpdated(WGDatabase). It informs the job runner about each update you do. It is then up to the job runner to do some maintenance from time to time to free resources.

Parameters

db (WGDatabase)

The database that has been updated.

Allowed in script types
  • TMLScript tasks in jobs
Examples
for(...){
    content().save();  			// do an update
    jobContext.dbUpdated(db());         // inform job runner about this
}