mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Data Processor 'On Save' and Snippets
.. a data processor can now be configured to run on save .. in addition, the data processor is now passed the operation that is triggering it: "Manual", "ADD", "UPDATE", "DELETE", "IMPORT". .. a new data processor has been added to write a JSON file to the snippet directory (added to the athlete structure). .. this is so we can output a snippet every time an activity is added, updated or deleted (i.e. runs "on save"). .. these JSON snippets can be used to update external datastores where coaches use other analytic software but don't want to manually sync GC changes with there external stores.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "RideFileCache.h"
|
||||
#include "RideCacheModel.h"
|
||||
#include "Specification.h"
|
||||
#include "DataProcessor.h"
|
||||
|
||||
#include "Route.h"
|
||||
|
||||
@@ -296,6 +297,10 @@ RideCache::removeCurrentRide()
|
||||
return;
|
||||
}
|
||||
|
||||
// dataprocessor runs on "save" which is a short
|
||||
// hand for add, update, delete
|
||||
DataProcessorFactory::instance().autoProcess(todelete->ride(), "Save", "DELETE");
|
||||
|
||||
// remove from the cache, before deleting it this is so
|
||||
// any aggregating functions no longer see it, when recalculating
|
||||
// during aride deleted operation
|
||||
|
||||
Reference in New Issue
Block a user