Coverage report: /development/source/library/org/datagraph/spocq-shard/src/store/rdfcache/start.lisp
| Kind | Covered | All | % |
| expression | 0 | 52 | 0.0 |
| branch | 0 | 8 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; -*- Mode: lisp; Syntax: ansi-common-lisp; Base: 10; Package: org.datagraph.spocq.implementation; -*-
3
(in-package :org.datagraph.spocq.implementation)
6
(defparameter *repository-content*
7
'(#p"yoda:Development:Source:dev:Library:de:setf:resource:test:family.nt"))
9
(defmethod (setf configuration-parameter) (list (parameter (eql :repository-content)))
10
(setq *repository-content*
11
(mapcar #'(lambda (location)
14
(string (puri:uri location))
20
;;; initial- and re-start
24
(initialize-and-run-store))
27
(defun initialize-and-run-store ()
28
(cond ((not (load-system-configuration *configuration-pathname*))
29
(log-error "Cannot load configuration: ~s." *configuration-pathname*))
30
((not (ignore-errors (ensure-directories-exist *log-pathname*)))
31
(log-error "Cannot locate log file: ~s." *log-pathname*))
33
(setq *repository* (make-instance 'de.setf.rdf:wilbur-mediator))
34
(dolist (url *repository-content*)
35
(de.setf.rdf:load-repository *repository* url))
36
(amqp:with-open-connection (accounting-connection :uri *broker-uri*)
37
(amqp:with-open-channel (*accounting-io* accounting-connection
38
:element-type '(unsigned-byte 8)
39
:content-type mime:application/octet-stream)
40
(setf (amqp.u:channel-content-type *accounting-io*) mime:application/octet-stream)
41
(unwind-protect (run-store)
42
(delete-file *pidfile-pathname*)))))))
46
(defun run-store (&rest args)
47
(handler-case (apply #'run-store-processor args)
49
(log-error "RUN Error: ~a." condition)
50
(log-stacktrace "RUN Error: ~a." condition))))
54
(amqp:with-open-connection (accounting-connection :uri *broker-uri*)
55
(amqp:with-open-channel (*accounting-io* accounting-connection
56
:element-type '(unsigned-byte 8)
57
:content-type mime:application/octet-stream)
58
(setf (amqp.u:channel-content-type *accounting-io*) mime:application/octet-stream)
59
(run-store :store-routing-key "foaf")))
61
ruby bin/spocq-query '(select (?s ?p ?o) (bgp (triple ?s ?p ?o)))'