summaryrefslogtreecommitdiff
path: root/src/hydrilla
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-23 11:39:32 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 12:54:52 +0200
commit7dc7b9c2c2d4b169ad545606e2fc7ef752a5d5a2 (patch)
tree10963c07ca2fd503601d02bb2bdd3a76c1f3a07d /src/hydrilla
parent6c35f796c659a6a3d839d4176b833db361f5678d (diff)
downloadhaketilo-hydrilla-7dc7b9c2c2d4b169ad545606e2fc7ef752a5d5a2.tar.gz
haketilo-hydrilla-7dc7b9c2c2d4b169ad545606e2fc7ef752a5d5a2.zip
update repository last refreshal time upon refreshing
Diffstat (limited to 'src/hydrilla')
-rw-r--r--src/hydrilla/proxy/state_impl/repos.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/hydrilla/proxy/state_impl/repos.py b/src/hydrilla/proxy/state_impl/repos.py
index 663a450..ae3b70c 100644
--- a/src/hydrilla/proxy/state_impl/repos.py
+++ b/src/hydrilla/proxy/state_impl/repos.py
@@ -240,7 +240,7 @@ class ConcreteRepoRef(st.RepoRef):
ensure_repo_not_deleted(cursor, self.id)
cursor.execute(
- 'SELECT url from repos where repo_id = ?;',
+ 'SELECT url FROM repos WHERE repo_id = ?;',
(self.id,)
)
@@ -258,6 +258,18 @@ class ConcreteRepoRef(st.RepoRef):
self.state.recompute_dependencies()
+ cursor.execute(
+ '''
+ UPDATE
+ repos
+ SET
+ last_refreshed = STRFTIME('%s', 'NOW')
+ WHERE
+ repo_id = ?;
+ ''',
+ (self.id,)
+ )
+
return ConcreteRepoIterationRef(str(new_iteration_id), self.state)
def get_display_info(self) -> st.RepoDisplayInfo: