Node red core Inject node remove seconds option from dropdown using configurations

Node-RED version: v3.1.9
Mode Version: v18.20.4

I am currently working with Node-RED and facing an issue with the Inject node. When a user sets the "repeat" option to loop every second, it can lead to potential performance issues or unintended behavior. I wo to remove the "repeat every 1 second" option from the dropdown menu in the Inject node configuration, but I haven’t found a solution yet.
is there any configuration or parameter that i can set to disabled the seconds option from the inject node so user want be able to use that option while using the inject node.

If anyone has worked on something similar or has an idea on how to achieve this, please share your insights or code examples. Your help would be greatly appreciated!

Why are you repeating the same question? You asked this a few days ago.

1 Like

@TotallyInformation In old question i put it as feature but as i see it does not need to be feature but i am looking for help in configuration where i can remove that seconds option .
Thanks

And It was already answered to: you cant.

  • build your own
  • Or use a rate limit node to throttle the output of the inject

And even if you did remove the seconds option, I think the user would still be able to enter 0.01 minutes, though I am on my phone and have not checked that.

I just tested @Colin idea however if you set the interval to 0.01 minutes, it gets changed to 0.6 seconds automatically

What are your users trying to achieve that makes them inject every second?

If you manage to prevent that, they can easily switch to using a trigger node resending the same message every 250 milliseconds or less.

One message per second does not seem especially frequent. What are these performance issues?

Or write a function node that could send every MILLISECOND!!

1 Like

I dont want to inject in seconds.
i want user to inject only in minutes as with seconds it make the flow performance slow.

they are trying to update the report or we can export some informatation which have 500+ records and if they export it on every second the system load and crash.

Do you mean that some system external to Node-red, a database maybe, will crash?

How many people have access to the Node-red editor? Would they be better off with a dashboard where their actions can more easily be controlled?

yes some user have node-red editor access so that why looking for configuration for the inject node to dont use the seconds option in dropdown.

They have access to the editor (and presumably write access)

If you cannibalise the inject, I will use a function node to do it :person_shrugging:

Sorry, but as long as they have write access - I’m not sure you have many options.

You can disable core nodes - but only disable, not alter their behaviour

And if you prevent that, you will also have to prevent access to the exec node and probably to the http-in/-response nodes. Then you will have to block all of the various timer nodes.

Oh, and you will have to block both Dashboards and UIBUILDER as well.

All of these can be used to generate high-speed flow executions.

As I think several of us have already made plain. Node-RED is a GENERAL PURPOSE compute tool. Trying to restrict it this way is foolish and unworkable.

There is, however, a very easy "solution". TELL your users not to be so stupid. :slight_smile:

1 Like

[quote="zenofmud, post:6, topic:93822"]
if you set the interval to 0.01 minutes, it gets changed to 0.6 seconds automatically
[/quote](

If the seconds option were not available it would be left as is. It is probably stored internally in ms anyway. The seconds option is just for the convenience of entering and displaying it.