I am trying to create a task for the default queue. for this, I wrote following codes, but it is not working.
//including
use google\appengine\api\taskqueue\PushTask;
use google\appengine\api\taskqueue\PushQueue;
//Initialising,
$task = new PushTask('/worker', [$values], ['header' => "Host: https://-myserviceurl"]);
$queue = new PushQueue('default');
$queue->addTasks([$task]);
My question is,
- Can we create tasks from the flexible environment if the PHP runtime is72?
- If the above method won't help me to create tasks, then how to create one while my all services in the flexible environment?