Skip to content

Commit

Permalink
Disable caching of artifacts in ProjectData objects
Browse files Browse the repository at this point in the history
To circumvent problems when updating the raw commits but not updating
the cached list of artifacts, we disable the caching of artifacts for
now.

Signed-off-by: Claus Hunsen <[email protected]>
Signed-off-by: Thomas Bock <[email protected]>
  • Loading branch information
clhunsen committed Mar 22, 2018
1 parent 7738e82 commit 1bed431
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions util-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ ProjectData = R6::R6Class("ProjectData",
commits.filtered = NULL, # data.frame
commits.filtered.empty = NULL, #data.frame
commits = NULL, # data.frame
artifacts = NULL, # list
synchronicity = NULL, # data.frame
pasta = NULL, # data.frame
## mails
mails = NULL, # data.frame
## authors
authors = NULL, # list
authors = NULL, # data.frame
## issues
issues = NULL, #data.frame
## timestamps of mail, issue and commit data
Expand Down Expand Up @@ -584,22 +583,17 @@ ProjectData = R6::R6Class("ProjectData",
#'
#' @return the list of artifacts
get.artifacts = function() {
## FIXME the artifacts determination should be dependent on the artifact.relation
## FIXME the artifacts determination should be dependent on the artifact.relation (which is in the net.conf which itself is not available here!)
## (see also get.author2artifact)
logging::loginfo("Getting artifact data.")

## if artifacts are not read already, do this
if (is.null(private$artifacts)) {
commits = self$get.commits.filtered.empty()

## get artifacts (empty list if no commits exist)
artifacts = unique(commits[["artifact"]])
if (is.null(artifacts)) artifacts = list()
commits = self$get.commits.filtered.empty()

private$artifacts = artifacts
}
## get artifacts (empty list if no commits exist)
artifacts = unique(commits[["artifact"]])
if (is.null(artifacts)) artifacts = list()

return(private$artifacts)
return(artifacts)
},

#' Get single pasta items.
Expand Down

0 comments on commit 1bed431

Please sign in to comment.