Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
juga
sbws
Commits
2df82656
Commit
2df82656
authored
Jul 16, 2018
by
Matt Traudt
Browse files
Document the state.dat file a little bit
parent
38799a01
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
2df82656
...
...
@@ -136,6 +136,8 @@ In this directory you will find
-
`datadir`
Once your sbws scanner has started gathering results, it will dump
them into this directory. Other sbws commands (such as generate and stats)
read results from the files in this directory.
-
`state.dat`
A file for storing state needed between sbws commands. See its
documentation for more information.
## Running tests
...
...
docs/source/index.rst
View file @
2df82656
...
...
@@ -25,6 +25,7 @@ Contents
faq
glossary
diagrams
state
sbws
Proposals
...
...
docs/source/sbws.util.rst
View file @
2df82656
...
...
@@ -28,6 +28,14 @@ sbws.util.parser module
:undoc-members:
:show-inheritance:
sbws.util.state module
~~~~~~~~~~~~~~~~~~~~~
.. automodule:: sbws.util.state
:members:
:undoc-members:
:show-inheritance:
sbws.util.stem module
~~~~~~~~~~~~~~~~~~~~~
...
...
docs/source/state.rst
0 → 100644
View file @
2df82656
The ``state.dat`` file
======================
This file contains state that multiple sbws commands may want access to and
that needs to persist across processes. Both read and write access to this file
is wrapped in the ``State`` class, allowing for safe concurrent access: the
file is locked before reading or writing, and (for now) only simple data types
are allowed so we can be sure to update the state file on disk every time the
state is modified in memory.
At the time of writing, the following fields can exist in the state file.
``scanner_started``
-------------------
The last time ``sbws scanner`` was started.
- **Producer**: ``sbws scanner``, once at startup.
- **Consumer**: ``sbws generate``, once each time it is ran.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment