Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable/Disable Processors with nipyapi #251

Open
rei-ber opened this issue Dec 21, 2020 · 1 comment
Open

Enable/Disable Processors with nipyapi #251

rei-ber opened this issue Dec 21, 2020 · 1 comment
Milestone

Comments

@rei-ber
Copy link

rei-ber commented Dec 21, 2020

  • Nipyapi version: 0.16.1
  • NiFi version: 1.11.4
  • NiFi-Registry version: -
  • Python version: 3.8.4
  • Operating System: Debian Buster

Description

If I try to start a disabled processor with schedule_processor(pg, True) and I get ValueError: Processor is disabled. I found out, how to enable it, but it would be nice to have it as an api method. Is there any plan to integrate a method for? Or is there any other way to do it?

What I Did

This is my workaround:

import nipyapi
pg = nipyapi.canvas.get_processor('PGName')[0]
pg.component.state = 'STOPPED'
nipyapi.nifi.ProcessorsApi().update_processor(pg.id, pg)
nipyapi.canvas.schedule_processor(pg, True)

Urgency

Due to an existing workaround, it is not critical.

@Chaffelson
Copy link
Owner

This seems like a good idea, we could add a switch to the function something like autoEnable=False by default, and if you set it to True then any disabled Controllers would be helpfully started for you

@Chaffelson Chaffelson added this to the 0.17.0 milestone Jan 14, 2021
Chaffelson added a commit that referenced this issue Jan 28, 2021
Add auto_enable switch to canvas.schedule_processor
Add test to canvas.schedule_processor for attempting to Start an invalid processor
@Chaffelson Chaffelson modified the milestones: 0.17.0, 0.20 Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants