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

[IDEA] Poll at Will Feature #4810

Open
amaster507 opened this issue Oct 20, 2021 · 7 comments
Open

[IDEA] Poll at Will Feature #4810

amaster507 opened this issue Oct 20, 2021 · 7 comments
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-7073 triaged

Comments

@amaster507
Copy link

Is your feature request related to a problem? Please describe.
When I need to poll a channel at will, I have to edit the channel to modify the poll on deploy to yes, then deploy the channel, then wait for the poll to finish, then modify the channel again not to poll on deploy, and then deploy again.

Describe your use case
I need this feature so I can accomplish Polling channels at will on command without needing to modify and deploy channels.

This effects channels with these source connector types:

  • Database Reader
  • File Reader
  • JavaScript Reader

Describe the solution you'd like
On the Channels list and/or at least on the Dashboard add a Dashboard Task to "Poll Channel Now"

Describe alternatives you've considered
I have to edit the channel to modify the poll on deploy to yes, then deploy the channel, then wait for the poll to finish, then modify the channel again not to poll on deploy, and then deploy again.

Additional context
This would also be useful in conjunction with #3020.

image

@amaster507 amaster507 added the enhancement New feature or request label Oct 20, 2021
@mkopinsky
Copy link

OMG YES PLEASE!

Relatedly, if I am using the workaround of poll-on-start, it would be great to set it with a cron of "never" rather than needing to schedule it for 2099

@amaster507
Copy link
Author

Also there was another user looking for this from the forum: https://forums.mirthproject.io/forum/mirth-connect/support/15097-how-to-manually-trigger-polling-of-source-database-reader

I've searched for a solution to this issue and have not yet found it.
We have a typical channel with a Source defined using a Database Reader with a SQL statement to query data from our source.
We are using the Schedule feature to poll our source on some set schedule.
We are not using the Poll Once on Start feature because we may have the need to make changes and redeploy the channel and can't be re-polling every time we deploy the channel. This could be happening during hours where we have to be sensitive to running queries against a production database in use by a facility.
The feature we are looking for is: manually triggering the source to do a poll.
The use case is: an analyst has determined there was an error with the channel config, has fixed the error, but now needs to trigger a poll of the source.
Solutions we've thought about:

  1. Setting the Channel to Poll Once on Start, redeploy, wait for the source records to be polled, set it back, redeploy. The issue is, waiting for the source records to be polled can take too long.
  2. Javascript, but how?
    Any help or pointers are greatly appreciated. Thank you!

Well the only way to "manually" trigger a poll is to enable Poll on Start and then (re)start the channel. Your first solution would work, though obviously it's not ideal. If you wanted to automate it with JavaScript that's possible, though you'd have to manually update the channel using the internal channel controller.

@amaster507
Copy link
Author

it would be great to set it with a cron of "never" rather than needing to schedule it for 2099

@mkopinsky that is exactly #3020

@ChristopherSchultz
Copy link
Contributor

Could you set a schedule of "every minute" and then modify a flag in the global map to say "actually do it or not", then just toggle the global map value? Is that too hacky?

@tonygermano
Copy link
Collaborator

@ChristopherSchultz I think a javascript reader would be the only polling connector where you would have the opportunity to check that value and skip "doing it."

@pladesma pladesma added Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-7073 triaged labels Oct 22, 2021
@KevinHobbsSeattle
Copy link

Yes that was me, re: Also there was another user looking for this from the forum: https://forums.mirthproject.io/forum/mirth-connect/support/15097-how-to-manually-trigger-polling-of-source-database-reader

I think your "Poll Now" feature idea is what we were looking for back then. Since then we've done things like, set to "Poll on Start", deploy, and set it back. We're also using cron to fire every minute but check a flag to see if you really should do it.

@amaster507
Copy link
Author

I don't like the idea of the cron job and flag. I would rather just deploy with some interval, poll on start, and then undeploy.

I don't want most channels to poll on deploy because whenever we do maintenance and have to reboot, I don't want ALL of my channels to run and bring down the startup.

This should actually be a really easy feat to run a script at will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-7073 triaged
Projects
None yet
Development

No branches or pull requests

6 participants