ashwanthkumar / gocd-janitor

Attempt at a more intelligent GoCD purge policy
16 stars 11 forks source link

Refactoring and Improved logging #11

Closed Refresh06 closed 8 years ago

Refresh06 commented 8 years ago

Refactoring to stop passing config and client around Improved logging

Refresh06 commented 8 years ago

Hi ashwanthkumar,

I started a refactoring because I was trying to batch the cleanup to avoid memory problems, not realizing that the problem was already solved in RC1 (thread leaking fix).

I think the refactoring still makes it a bit cleaner and therefor submit it for you to review.

The logging improvements makes the output pretty neat if you disable debug logging.

ashwanthkumar commented 8 years ago

@Refresh06 Thanks for the PR. I'm sorry I didn't make that change into a Stable release. Will do it once we merge these changes.

I've added a few comments on some the new LOG.info - see if they make sense. A couple of minor style comments. Let me know your thoughts.

ashwanthkumar commented 8 years ago

@Refresh06 I agree with you on the comments. Just push that private methods alone to the bottom - rest LGTM. Once you're done with the changes, I'll merge them in.

Refresh06 commented 8 years ago

@ashwanthkumar Private method moved to bottom. Thanks for a great initiative by the way. Our Artifact repository was approaching 1 TB and I wasn't happy to enable the stock cleanup.

ashwanthkumar commented 8 years ago

Thanks for the contribution @Refresh06