def Run(self, args): tasks_client = tasks.Tasks() queue_ref = parsers.ParseQueue(args.queue, args.location) duration = parsers.FormatLeaseDuration(args.lease_duration) filter_string = parsers.ParseTasksLeaseFilterFlags(args) return tasks_client.Lease(queue_ref, duration, filter_string=filter_string, max_tasks=args.limit).tasks
def Run(self, args): tasks_client = tasks.Tasks() queue_ref = parsers.ParseQueue(args.queue, args.location) task_ref = parsers.ParseTask(args.task, queue_ref) duration = parsers.FormatLeaseDuration(args.lease_duration) return tasks_client.RenewLease(task_ref, args.schedule_time, duration)
def Run(self, args): tasks_client = GetApiAdapter(self.ReleaseTrack()).tasks queue_ref = parsers.ParseQueue(args.queue, args.location) task_ref = parsers.ParseTask(args.task, queue_ref) duration = parsers.FormatLeaseDuration(args.lease_duration) return tasks_client.RenewLease(task_ref, args.schedule_time, duration)