Skip to content

Commit

Permalink
Merge pull request #37 from ecmwf/feature/serverside-callback
Browse files Browse the repository at this point in the history
Use fdb callback interface
  • Loading branch information
ChrisspyB authored Jan 14, 2025
2 parents 64348b0 + cc3d323 commit fc689d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/gribjump/FDBPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FDBPlugin& FDBPlugin::instance() {

FDBPlugin::FDBPlugin() {
// NB: Can't access eckit::Resource outside the callback because eckit::main has not finished initialising
fdb5::LibFdb5::instance().registerConstructorCallback([](fdb5::FDB& fdb) {
fdb5::LibFdb5::instance().registerConstructorCallback([](fdb5::CallbackRegistry& fdb) {
static bool enableGribjump = eckit::Resource<bool>("fdbEnableGribjump;$FDB_ENABLE_GRIBJUMP", false);
static bool disableGribjump = eckit::Resource<bool>("fdbDisableGribjump;$FDB_DISABLE_GRIBJUMP", false); // Emergency off-switch
if (enableGribjump && !disableGribjump) {
Expand All @@ -44,7 +44,7 @@ FDBPlugin::FDBPlugin() {
});
}

void FDBPlugin::addFDB(fdb5::FDB& fdb) {
void FDBPlugin::addFDB(fdb5::CallbackRegistry& fdb) {

parseConfig();
std::lock_guard<std::mutex> lock(mutex_);
Expand Down
2 changes: 1 addition & 1 deletion src/gribjump/FDBPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FDBPlugin {
public:

static FDBPlugin& instance();
void addFDB(fdb5::FDB& fdb);
void addFDB(fdb5::CallbackRegistry& fdb);

private:

Expand Down

0 comments on commit fc689d8

Please sign in to comment.