openfaas / connector-sdk

SDK for connecting events to functions
MIT License
54 stars 25 forks source link

Immediately sync the topic map. #32

Closed bmcustodio closed 4 years ago

bmcustodio commented 5 years ago

Turns out that calling BeginMapBuilder doesn't immediately start syncing the topic map, rather waiting until the first "rebuild interval" elapses to start doing that. This may not be entirely noticeable for small values of "rebuild interval", but if this is set to 30 seconds, for instance, that means no function invocations will occur during the first 30 seconds of execution. This PR changes this behaviour so that the first synchronisation happens right after calling BeginMapBuilder.

alexellis commented 5 years ago

I agree about the repetitive messages.

alexellis commented 4 years ago

@bmcstdio what do you think to a flag / ENV-var for the messages?

LOG_SYNC=0/1
bmcustodio commented 4 years ago

@alexellis I think we'd be better off with log levels and a way to set the log level.