diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-08-23 11:39:32 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-28 12:54:52 +0200 |
commit | 7dc7b9c2c2d4b169ad545606e2fc7ef752a5d5a2 (patch) | |
tree | 10963c07ca2fd503601d02bb2bdd3a76c1f3a07d /src/hydrilla/proxy/state_impl | |
parent | 6c35f796c659a6a3d839d4176b833db361f5678d (diff) | |
download | haketilo-hydrilla-7dc7b9c2c2d4b169ad545606e2fc7ef752a5d5a2.tar.gz haketilo-hydrilla-7dc7b9c2c2d4b169ad545606e2fc7ef752a5d5a2.zip |
update repository last refreshal time upon refreshing
Diffstat (limited to 'src/hydrilla/proxy/state_impl')
-rw-r--r-- | src/hydrilla/proxy/state_impl/repos.py | 14 |
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: |