mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
graph-pull-hook: only archive graph if we already have it
This commit is contained in:
parent
4213543e35
commit
e04d9f2dba
@ -20,6 +20,7 @@
|
||||
+* this .
|
||||
def ~(. (default-agent this %|) bowl)
|
||||
dep ~(. (default:pull-hook this config) bowl)
|
||||
gra ~(. graph bowl)
|
||||
::
|
||||
++ on-init on-init:def
|
||||
++ on-save !>(~)
|
||||
@ -35,6 +36,7 @@
|
||||
|= [=resource =tang]
|
||||
^- (quip card _this)
|
||||
:_ this
|
||||
?. (~(has in get-keys:gra) resource) ~
|
||||
=- [%pass /pull-nack %agent [our.bowl %graph-store] %poke %graph-update -]~
|
||||
!> ^- update:store
|
||||
[%0 now.bowl [%archive-graph resource]]
|
||||
@ -42,7 +44,7 @@
|
||||
++ on-pull-kick
|
||||
|= =resource
|
||||
^- (unit path)
|
||||
=/ maybe-time (peek-update-log:graph resource)
|
||||
=/ maybe-time (peek-update-log:gra resource)
|
||||
?~ maybe-time `/
|
||||
`/(scot %da u.maybe-time)
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user