Commit a552f3cb authored by Dave Cooper's avatar Dave Cooper
Browse files

swapped find-dependencies and find-dependants, added error-handling to quick-save for snapshots.

parent a196b5f5
...@@ -180,10 +180,11 @@ You have a dependency on caffeine. Your children are your dependants. ...@@ -180,10 +180,11 @@ You have a dependency on caffeine. Your children are your dependants.
(when message-hash (reverse (gethash message-key message-hash))))) (when message-hash (reverse (gethash message-key message-hash)))))
(defun find-dependants (instance message-key) (defun find-dependants (instance message-key)
(find-messages-which-use instance message-key)) "List of pairs of instance/keyword. Synonymous with find-messages-used-by."
(find-messages-used-by instance message-key))
(defun find-messages-which-use (instance message-key) (defun find-messages-which-use (instance message-key)
"List of pairs of instance/keyword. This returns the list of direct dependants of a given "List of pairs of instance/keyword. This returns the list of direct dependencies of a given
message in a given instance. Note that this is not recursive; if you want to generate a tree, message in a given instance. Note that this is not recursive; if you want to generate a tree,
then you have to call this recursively yourself. then you have to call this recursively yourself.
...@@ -204,7 +205,8 @@ You have a dependency on caffeine. Your children are your dependants. ...@@ -204,7 +205,8 @@ You have a dependency on caffeine. Your children are your dependants.
(push (list instance (make-keyword (string message))) result))))))) (push (list instance (make-keyword (string message))) result)))))))
(defun find-dependencies (instance message-key) (defun find-dependencies (instance message-key)
(find-messages-used-by instance message-key)) "List of pairs of instance/keyword. Synonymous with find-messages-which-use."
(find-messages-which-use instance message-key))
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
(merge-pathnames (merge-pathnames
(make-pathname :name (format nil "~a" (the instance-id)) (make-pathname :name (format nil "~a" (the instance-id))
:type "snap") snap-folder))) :type "snap") snap-folder)))
(the (write-snapshot :filename snap-file)))) (with-error-handling ()
(the (write-snapshot :filename snap-file)))))
(defun restore-from-snap (iid) (defun restore-from-snap (iid)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment