Hi,
I am having issue on creating a cron job on google contact upload.
I use following function to dispatch a task
Keep in mind that in data, entityType is set to Contact, and idList is set of contact id's fetched from database.
I get issue following issue on executing the task:
Error Details: Call to a member function getContactsClient() on null. All linking to google contact is set properly, and when i do manual push of data it works.
I am having issue on creating a cron job on google contact upload.
I use following function to dispatch a task
PHP Code:
$collection = $this->getEntityManager()->getRepository('Contact')->where(array('deleted' => false))->find();
try {
$gc = new GoogleContacts($this->getContainer());
foreach($collection as $contactData) {
array_push($data->idList, $contactData->id);
$gc->actionPush(null, $data, null);
}
}catch (\Exception $e) {
$GLOBALS['log']->error('GoogleContactSync: Run Sync Error: ' . $e);
}
I get issue following issue on executing the task:
Error Details: Call to a member function getContactsClient() on null. All linking to google contact is set properly, and when i do manual push of data it works.