Query Listeners

As it involves hitting a database, and I am looking for the output in fusion reactor, that will be tricky.

what has fusion reactor got to do with it???

all the test case needs to show is that the template eq “F” in the query listener?

On a related note, I was just playing around with the idea of adding a “retry policy” to CFHttp; and it occurs to me that the CFHttp tag would be another place where a “listener” could be helpful.

Imagine something like:

http
	result = "httpResponse"
	method = "get"
	url = "https://..."
	listener = {
		shouldRetry: ( req, res, count ) => {
			return( count < 5 );
		},
		delayBeforeNextRetry: ( req, res, count ) => {
			return( randRange( 100, 1000 ) );
		}
	}
;

Anyway, just thinking out loud.

4 Likes