Introduce AppEventsCleanup to cleanup old events

[#62823112]
Delete app usage events older than 31 days

* Currently hardcoded to 31 days in job

[#62482050]

Signed-off-by: Aram Price <aprice@pivotallabs.com>
Inject prune threshold into AppUsageEventCleanup job

[#62482050]

Signed-off-by: Aram Price <aprice@pivotallabs.com>
Schedule to clean up old app events.

[#62823112]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Make AppUsageEventsCleanup and AppEventsCleanup consistent

[#62823112]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Reorganize specs by job

[#62823112]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Turn Clock into a class so its easier to inject dependencies

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Make cutoff_age_in_days for AppEvent and AppUsageEvent configurable

[#62823112] [#62482050]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Reduce duplication and split complex method

[Fixes #62961826]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Move back to published talentbox-delayed_job_sequel

[#62957900]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Provide a better error message for duplicate plans

[Finishes #62601096]
Log the changes on app update

[#61267804]

Signed-off-by: Johannes Tuchscherer <jtuchscherer@pivotallabs.com>
Log when the app is deleted

[#61267838]
Only seed app usage events with STARTED apps.
Merge pull request #142 from cloudfoundry/only_seed_app_usage_events_with_started_apps

Only seed app usage events with STARTED apps.
Remove unused code
Fix flaky loggregator integration spec

Signed-off-by: Phan Le <ple@pivotallabs.com>
Remove loggegrator integration test as it is already covered in a unit test

Signed-off-by: Phan Le <ple@pivotallabs.com>
Don't print array literals in error messages

[#62601096]
adding tests for error formatting of errors class