nipyapi icon indicating copy to clipboard operation
nipyapi copied to clipboard

Prevent processors from overlapping

Open omkaringale opened this issue 4 years ago • 2 comments

  • Nipyapi version: 0.14.3
  • NiFi version: 1.12.1
  • NiFi-Registry version: 0.8.0
  • Python version: 3.8
  • Operating System: Windows 10

Description

Trying to prevent processors from overlapping when I run the code. I want the code to detect if there is already a processor in the location.

What I Did

processor_list = ['GetHTTP','EvaluateJsonPath','AttributesToJSON','PutMongo']
for key,proc in enumerate(processor_list):
            location_y = 300*i
            location_x = 500*(key+1)
            location = (location_x,location_y)

Urgency

Trying to automate a process flow which is still in development phase, so not that urgent

omkaringale avatar Dec 17 '20 09:12 omkaringale

Quite a while back I made a function for this, but forgot to bring it into the main project - actually I'm glad you reminded me. https://github.com/Chaffelson/nipyapi/blob/e3f74d1650941d1011bd44a581c13a4e63763a1b/nipyapi/agents.py#L170 That's where it is on the current branch if you want to use it directly now, I'll make a note to pull it into the next feature release.

Chaffelson avatar Jan 14 '21 14:01 Chaffelson

@omkaringale do you have time to look at the implementation I have suggested here to see if it helps your usecase?

Chaffelson avatar Jan 28 '21 16:01 Chaffelson