func ModifyLease(c context.Context, task *Task, queueName string, leaseTime int) error {
	if queueName == "" {
		queueName = "default"
	}
	req := &pb.TaskQueueModifyTaskLeaseRequest{
		QueueName:    []byte(queueName),
		TaskName:     []byte(task.Name),
		EtaUsec:      proto.Int64(task.ETA.UnixNano() / 1e3), // Used to verify ownership.
		LeaseSeconds: proto.Float64(float64(leaseTime)),
	}
	res := &pb.TaskQueueModifyTaskLeaseResponse{}
	if err := internal.Call(c, "taskqueue", "ModifyTaskLease", req, res); err != nil {
		return err
	}
	task.ETA = time.Unix(0, *res.UpdatedEtaUsec*1e3)
	return nil
}
func ModifyLease(c context.Context, task *Task, queueName string, leaseTime int) error {
	if queueName == "" {
		queueName = "default"
	}
	req := &pb.TaskQueueModifyTaskLeaseRequest{
		QueueName:    []byte(queueName),
		TaskName:     []byte(task.Name),
		EtaUsec:      proto.Int64(task.ETA.UnixNano() / 1e3), 
		LeaseSeconds: proto.Float64(float64(leaseTime)),
	}
	res := &pb.TaskQueueModifyTaskLeaseResponse{}
	if err := internal.Call(c, "taskqueue", "ModifyTaskLease", req, res); err != nil {
		return err
	}
	task.ETA = time.Unix(0, *res.UpdatedEtaUsec*1e3)
	return nil
}
func ModifyLease ( c context . Context , task * Task , queueName string , leaseTime int ) error { if queueName == " " { queueName = " " } req := & pb . TaskQueueModifyTaskLeaseRequest { QueueName : [ ] byte ( queueName ) , TaskName : [ ] byte ( task . Name ) , EtaUsec : proto . Int64 ( task . ETA . UnixNano ( ) / 1e3 ) , // Used to verify ownership. LeaseSeconds : proto . Float64 ( float64 ( leaseTime ) ) , } res := & pb . TaskQueueModifyTaskLeaseResponse { } if err := internal . Call ( c , " " , " " , req , res ) ; err != nil { return err } task . ETA = time . Unix ( 0 , * res . UpdatedEtaUsec * 1e3 ) return nil }
// ModifyLease modifies the lease of a task.
// Used to request more processing time, or to abandon processing.
// leaseTime is in seconds and must not be negative.
ModifyLease modifies the lease of a task . Used to request more processing time or to abandon processing . leaseTime is in seconds and must not be negative .