This topic contains 1 reply, has 2 voices, and was last updated by  Ushter.M 2 months, 2 weeks ago.

Staged startup of channels

  • We would like to add this feature:
    When using the “Channel Actions” to restart a set of channels from the dashboard, we would like to be able to select a delay between the individual channel’s startup.
    The channels would be restarted sequentially with a delay between each one.
    This would spread out the load of the starting channels instead of everything launching all at once.
    This delay could be offered in a pop-up after the Channel Action selection. And/Or it could be a configuration point which could also apply during server startup.

    We have a scenario with a fairly heavy application running in channels with Source=translator. This application pulls data from databases, makes API calls pulling data from external sources and then manipulates and saves that data.
    It would be very nice to be able to stagger the impact of starting up these channels.

    Hi Casey,
    One way you can accomplish the above workflow is by controlling the start/stop action using the /status api within your translator ,

    Now I performed this locally for which I used our /monitor_query api to retrieve the xml information of the channel from which I parsed the data till I get the channel names of each channel from my instance and individually inserted them in an empty table,

    local ChannelInfo ={url='https://localhost:6543/monitor_query',
    --parse through the xml to retrieve channel names
    local NameParse = xml.parse(ChannelInfo)
    local ChannelName = NameParse.IguanaStatus
    --Insert channel names in your empty table
    for i=1, ChannelName:childCount("Channel") do
    table.insert(Names, ChannelName:child("Channel", i).Name)

    From there I use a for loop to loop through each entry of my table and started each Iguana channel followed by util.sleep to pause for 3 seconds between each channel action as shown below

    for i =1, #Names do
    local Trigger ={url='https://localhost:6543/status',
    parameters={action='start', name=Names[i]},

    This I believe can give me more control over the duration of the delay as well as any inclusion/exclusion you would want to perform,
    I referenced the following link ,which also contains additional information:

    I’ve also dropped my full project below as an example

    Hope this helps!
    Meer Ushter.

    You must be logged in to view attached files.

You must be logged in to reply to this topic.