Replies: 4 comments 12 replies
-
You will want to look for the enqueue_job (I think it is that) in the netbox code. It is what handles sending the job to redis. |
Beta Was this translation helpful? Give feedback.
-
While this may technically work, it calling one script from another certainly feels like an anti-pattern. My recommendation would be to separate out whatever second phase logic you need into something that can be called by either this script or the other script directly. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the superfast replies! I was thinking about moving the class out completely, too, I think that makes most sense. Is there a place where I should be placing my custom modules? I think I couldn't pick up files locally from the script folder. Thanks again, |
Beta Was this translation helpful? Give feedback.
-
Did you find out where to put custom modules? They will not be loaded if I simply put them in the scripts folder next to my custom scripts. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
We have started to develop a number of custom scripts to perform different actions (they work brilliantly, btw), but after all changes we should update the to-be-modified-devices' config context, for which we have a separate custom script.
I know that it is possible to call the custom scripts via API, but is there a way to call a script directly or at least import classes/functions from them?
Thanks a lot,
Zsolt
Beta Was this translation helpful? Give feedback.
All reactions