... build pipeline ...
pipeline_result = p.run()
if job_taking_too_long:
  pipeline_result.cancel()

Python:
https://github.com/apache/beam/blob/95d0ac5e5cb59fd0c6a8a4861a38a7087a6c46b5/sdks/python/apache_beam/runners/runner.py#L372
Java:
https://github.com/apache/beam/blob/ce77db10cdd5f021f383721a90f30205aff0fabe/sdks/java/core/src/main/java/org/apache/beam/sdk/PipelineResult.java#L46

On Wed, May 1, 2019 at 11:48 PM Chaim Turkel <ch...@behalf.com> wrote:

> Hi,
>    I have a batch job that should run for about 40 minutes. There are
> times that it can run for hours, and i don't know why.
> I need the option to cancel the job if it runs for more than x
> minutes. I can do this from the gui or the gcloud cli.
>   Is there an api code that i can do this preferable in python, java is
> also ok
>
>
> chaim
>
> --
>
>
> Loans are funded by
> FinWise Bank, a Utah-chartered bank located in Sandy,
> Utah, member FDIC, Equal
> Opportunity Lender. Merchant Cash Advances are
> made by Behalf. For more
> information on ECOA, click here
> <https://www.behalf.com/legal/ecoa/>. For important information about
> opening a new
> account, review Patriot Act procedures here
> <https://www.behalf.com/legal/patriot/>.
> Visit Legal
> <https://www.behalf.com/legal/> to
> review our comprehensive program terms,
> conditions, and disclosures.
>

Reply via email to