cloud-sdk-go icon indicating copy to clipboard operation
cloud-sdk-go copied to clipboard

Add monitoring capabilities to the pool

Open ppapapetrou76 opened this issue 5 years ago • 0 comments

Overview

Our awesome pool is heavily used in cloud-deployer and it's super fast! We would like to send dynamic slack notifications during the workers' processing like how many items have been processed so far, how many pending, errors etc.

Possible Implementation

I'd consider two different implementations

Add API so that consumers call it to get the information needed

This gives consumers the flexibility of poking the API directly and processing the results as required. Ideally, I'd expect that results are the structure that has been passed in workers during pool initialization

Inject a function inside the pool

This would require the addition of 2-3 new fields during pool creation

  • Function to inject
  • Frequency
  • Initial timeout before injecting the function for the first time

The pool would know then when to run this function internally This gives less flexibility to the consumers but hides all the details inside the pool

Context

Make our awesome pool more awesome

ppapapetrou76 avatar Apr 16 '20 10:04 ppapapetrou76