getNumRunningScrapingSessions
int sutil.getNumRunningScrapingSessions ()
int sutil.getNumRunningScrapingSessions ( String scrapingSessionName )
int sutil.getNumRunningScrapingSessions ( String scrapingSessionName )
Description
Gets the number of scraping sessions that are currently being run.
Parameters
- scrapingSessionName Narrows the scope to a given scraping session, if this parameter is passed in.
Return Values
An int representing the number of running scraping sessions.
Change Log
Version | Description |
---|---|
5.5.42a | Available in Enterprise edition. |
Examples
session.log( "Num running scraping sessions: " + sutil.getNumRunningScrapingSessions( session.getName() ) );
if( sutil.getNumRunningScrapingSessions( session.getName() ) > 1 )
{
session.log( "SESSION ALREADY RUNNING." );
session.stopScraping();
return;
}
if( sutil.getNumRunningScrapingSessions( session.getName() ) > 1 )
{
session.log( "SESSION ALREADY RUNNING." );
session.stopScraping();
return;
}
todd on 03/12/2012 at 4:26 pm
- Printer-friendly version
- Login or register to post comments