Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbws
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
juga
sbws
Commits
2df82656
Commit
2df82656
authored
6 years ago
by
Matt Traudt
Browse files
Options
Downloads
Patches
Plain Diff
Document the state.dat file a little bit
parent
38799a01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
docs/source/index.rst
+1
-0
1 addition, 0 deletions
docs/source/index.rst
docs/source/sbws.util.rst
+8
-0
8 additions, 0 deletions
docs/source/sbws.util.rst
docs/source/state.rst
+20
-0
20 additions, 0 deletions
docs/source/state.rst
with
31 additions
and
0 deletions
README.md
+
2
−
0
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
...
...
This diff is collapsed.
Click to expand it.
docs/source/index.rst
+
1
−
0
View file @
2df82656
...
...
@@ -25,6 +25,7 @@ Contents
faq
glossary
diagrams
state
sbws
Proposals
...
...
This diff is collapsed.
Click to expand it.
docs/source/sbws.util.rst
+
8
−
0
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
~~~~~~~~~~~~~~~~~~~~~
...
...
This diff is collapsed.
Click to expand it.
docs/source/state.rst
0 → 100644
+
20
−
0
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.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment