init() public method

public init ( $args )
 /**
  * This is an optional initialization function called before any execute functions.
  *
  * If you don't need to do any initialization common to every execution of this module,
  * you can simply remove this init() method. 
  *
  */
 public function init()
 {
     parent::init();
     // always remember to call the parent init
 }
Example #2
0
	$deviceToken = $unserialized->{'deviceToken'};
	$value = $unserialized->{'payload'};
	

	// Try to send the message 3 times
	for($i = 0; $i < 3; $i++)
	{
		if($debug)
		{
			echo "Sending message\n";
		}
		
		if(!$process)
		{
			$process = new Process(1153 + $i);
			if(!$process->init())
			{
				echo "Error while starting child process\n";
				
				$process->kill();
				$process = false;
				if($debug)
				{
					echo "Sleeping 10 seconds before trying again\n";
				}
				
				sleep(10);
				continue;
			}
		}