MCPcopy Index your code
hub / github.com/emwalker/digraph / activity

Method activity

backend/src/store.rs:57–77  ·  view source on GitHub ↗
(
        &self,
        repo_id: RepoId,
        topic_id: &Option<ExternalId>,
        first: i32,
    )

Source from the content-addressed store, hash-verified

55
56impl Store {
57 pub async fn activity(
58 &self,
59 repo_id: RepoId,
60 topic_id: &Option<ExternalId>,
61 first: i32,
62 ) -> Result<Vec<git::activity::Change>> {
63 let result = git::activity::FetchActivity {
64 actor: Arc::clone(&self.viewer),
65 path: topic_id.as_ref().map(|id| (repo_id, id.to_owned())),
66 first: first.try_into().unwrap_or(3),
67 }
68 .call(&self.git, &self.redis);
69
70 match result {
71 Ok(git::activity::FetchActivityResult { changes, .. }) => Ok(changes),
72 Err(err) => {
73 log::error!("problem fetching activity: {}", err);
74 Ok(vec![])
75 }
76 }
77 }
78
79 pub async fn delete_account(&self, user_id: String) -> Result<psql::DeleteAccountResult> {
80 log::info!("account deletion: fetching account info for {}", user_id);

Callers

nothing calls this directly

Calls 2

callMethod · 0.45
try_intoMethod · 0.45

Tested by

no test coverage detected