updateMetadataForTags: update metadata for a set of tags

Description Usage Arguments Value Note Author(s)

View source: R/updateMetadataForTags.R

Description

These tags might be newly registered, or grabbed from motus.org when refreshing the metadata cache. Either way, they might be new tags and/or have new or modified deployments. After cleaning up registration and deployment info for the tags, this function updates the metadata cache (including the derived events table) and its slim copy in the Motus mariaDB, and commits any changes to the metadata-history repo.

Usage

1
2
updateMetadataForTags(t, meta = MetaDB, p = meta("select * from projs"),
  fixBI = FALSE)

Arguments

t:

data.frame of tags, as returned by motusSearchTags()

meta:

safeSQL object to metadata DB; default: the global variable MetaDB

p:

data.frame of projects, as returned by motusListProjects() default: meta("select * from projs")

fixBI:

logical scalar; should burst intervals be corrected? default: FALSE

Value

TRUE on success. Generates an error on failure.

Note

: this function must be called within an EXCLUSIVE transaction on meta. This is to ensure that changes to the tags and events tables are atomic with respect to the tag finder ('find_tags_motus') program, so that the latter can record the commit hash from the metadata-history that corresponds to the metadata it is using.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


jbrzusto/motusServer documentation built on May 19, 2019, 8:19 a.m.