Data storage functionality. Next to basic storage implementations, this ns also contains a lot of functions for working with storage entities. Many of these are overridden by implementation-specific functions, and so implementations here don't focus on efficiency. They are merely used in tests.
Data storage functionality. Next to basic storage implementations, this ns also contains a lot of functions for working with storage entities. Many of these are overridden by implementation-specific functions, and so implementations here don't focus on efficiency. They are merely used in tests.
(build-exists? s sid)
Checks efficiently if the build exists. This is cheaper than trying to fetch it
and checking if the result is nil
.
Checks efficiently if the build exists. This is cheaper than trying to fetch it and checking if the result is `nil`.
Calculates the available credits for the org. Basically this is the amount of provisioned credits, substracted by the consumed credits.
Calculates the available credits for the org. Basically this is the amount of provisioned credits, substracted by the consumed credits.
(create-build-metadata s md)
(create-build-metadata s sid md)
Deletes a single parameter set by sid
Deletes a single parameter set by sid
Deletes repository with given sid, including all builds
Deletes repository with given sid, including all builds
Retrieves bitbucket webhook given an internal webhook id
Retrieves bitbucket webhook given an internal webhook id
(find-build-metadata s sid)
Reads the build metadata given the build coordinates (required to build the path)
Reads the build metadata given the build coordinates (required to build the path)
(find-build-results s sid)
Reads the build results given the build coordinates
Reads the build results given the build coordinates
Finds job by it's sid, which is the build sid with the job id added
Finds job by it's sid, which is the build sid with the job id added
Retrieves the latest build for the repo
Retrieves the latest build for the repo
Retrieves all latest builds for all repos for the org
Retrieves all latest builds for all repos for the org
Retrieves the latest n
builds, over all repos for the org.
Retrieves the latest `n` builds, over all repos for the org.
Retrieves the next integer build index to use. This is supposed to be the highest build index + 1.
Retrieves the next integer build index to use. This is supposed to be the highest build index + 1.
Fetches multiple orgs, without repos
Fetches multiple orgs, without repos
Retrieves a single parameter by sid
Retrieves a single parameter by sid
Reads the repo, as part of the org object's projects
Reads the repo, as part of the org object's projects
(find-runner-details st sid)
Retrieves runner details for given build sid
Retrieves runner details for given build sid
Find user by type id (e.g. github)
Find user by type id (e.g. github)
Looks up all watched repos with the given github id
Looks up all watched repos with the given github id
(legacy-build-exists? s sid)
Similar to build-exists?
but for legacy builds that consist of metadata and
result entities.
Similar to `build-exists?` but for legacy builds that consist of metadata and result entities.
Lists all active credit subscriptions at given timestamp
Lists all active credit subscriptions at given timestamp
Lists all available org credits. These are the credits that have not been fully consumed, i.e. the difference between the amount and the sum of all consumptions linked to the credit is positive.
Lists all available org credits. These are the credits that have not been fully consumed, i.e. the difference between the amount and the sum of all consumptions linked to the credit is positive.
(list-build-ids s sid)
Lists the ids of the builds for given repo sid
Lists the ids of the builds for given repo sid
Lists all builds for the repo, and fetches the build details, similar to find-build
but does not contain the job details.
Lists all builds for the repo, and fetches the build details, similar to `find-build` but does not contain the job details.
Retrieves all builds for org since the given timestamp
Retrieves all builds for org since the given timestamp
Lists all org credits for the org since given timestamp.
This includes those without a from-time
.
Lists all org credits for the org since given timestamp. This includes those without a `from-time`.
Retrieves all org join requests for that org
Retrieves all org join requests for that org
Lists all display ids for the repos for given org
Lists all display ids for the repos for given org
Retrieves all org join requests for that user
Retrieves all org join requests for that user
(patch-build-results st sid f & args)
Finds the build result with given sid, then applies f
to it with arguments
and saves the return value back into the result.
Finds the build result with given sid, then applies `f` to it with arguments and saves the return value back into the result.
(save-bb-webhook s wh)
Stores bitbucket webhook information. This links a Bitbucket native webhook uuid to a MonkeyCI webhook.
Stores bitbucket webhook information. This links a Bitbucket native webhook uuid to a MonkeyCI webhook.
(save-build s build)
Creates or updates the build entity. without the jobs.
Creates or updates the build entity. without the jobs.
Saves the job in the build indicated by the sid
Saves the job in the build indicated by the sid
(save-params s cust-id p)
Saves all org parameters at once
Saves all org parameters at once
(save-queued-task st task)
Saves retry task, which is used by the dispatcher to reschedule tasks that could not be executed immediately.
Saves retry task, which is used by the dispatcher to reschedule tasks that could not be executed immediately.
Saves the repository by updating the org it belongs to
Saves the repository by updating the org it belongs to
(save-runner-details st sid details)
Saves runner details for the given build sid
Saves runner details for the given build sid
Retrieves bitbucket webhook that match given filter, and adds org and repo ids.
Retrieves bitbucket webhook that match given filter, and adds org and repo ids.
Removes the records to stop watching the repo. The entity will still exist, so any past builds can be looked up.
Removes the records to stop watching the repo. The entity will still exist, so any past builds can be looked up.
Applies f
to the repo with given sid
Applies `f` to the repo with given sid
Creates necessary records to start watching a github repo. Creates the repo entity and returns it.
Creates necessary records to start watching a github repo. Creates the repo entity and returns it.
(with-transaction st conn & body)
Runs body in transaction by binding a transactional storage object to conn
.
If the storage implementation does not support transactions, this just invokes
the body while binding the original storage to conn
.
Runs body in transaction by binding a transactional storage object to `conn`. If the storage implementation does not support transactions, this just invokes the body while binding the original storage to `conn`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close