DATA_REFRESH_INTERVAL=1h0m0s
can be set to refresh data more or less often. The value should match Go's time.ParseDuration
syntax.
Make a request to /data/refresh
on the admin HTTP interface (:9094
by default).
$ curl http://localhost:9094/data/refresh
{"SDNs":7724,"altNames":10107,"addresses":12145,"deniedPersons":548}
By default OFAC downloads various files from treasury.gov on startup and will periodically download them to keep the data updated.
This URL can be changed and follows a template as several files are downloaded (example: add.csv
or sdn.csv
). To change where OFAC files are downloaded set:
OFAC_DOWNLOAD_TEMPLATE='https://www.treasury.gov/ofac/downloads/%s'
You should make the following files available at the new endpoint: add.csv
, alt.csv
, sdn.csv
, sdn_comments.csv
.
By default Denied Person's List (DPL) downloads from the BIS website on startup and will periodically re-download to keep data fresh.
The URL can be changed, but must end with dpl.txt
in the final URL path segment.
DPL_DOWNLOAD_TEMPLATE=https://www.bis.doc.gov/dpl/%s
You can specify the INITIAL_DATA_DIRECTORY=test/testdata/
environmental variable for Watchman to initially load data from a local filesystem. The data will be refreshed normally, but not downloaded on startup.
To change where the SQLite database is stored on disk set SQLITE_DB_PATH
as an environmental variable.
The size of each batch of watches to be processed (and their webhook called) can be adjusted with WEBHOOK_BATCH_SIZE=100
. This is intended for performance improvements by using a larger batch size.
We have an example Prometheus alert for being notified of stale data. This helps discover issues incase download or parsing fails.