[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [sbws/master] Merge branch 'state_file_02'



commit bddbf47a0fd9ab5aca7c6a257447f09716d95686
Merge: 137cc27 42b80dc
Author: Matt Traudt <sirmatt@xxxxxxx>
Date:   Wed Aug 1 18:06:32 2018 -0400

    Merge branch 'state_file_02'

 CHANGELOG.md                  |   2 +
 README.md                     |   2 +
 docs/source/index.rst         |   1 +
 docs/source/sbws.util.rst     |   8 +++
 docs/source/state.rst         |  20 +++++++
 sbws/config.default.ini       |   2 +-
 sbws/core/scanner.py          |  22 ++------
 sbws/lib/v3bwfile.py          |  34 ++++--------
 sbws/util/config.py           |   4 +-
 sbws/util/state.py            |  99 +++++++++++++++++++++++++++++++++++
 tests/unit/util/test_state.py | 119 ++++++++++++++++++++++++++++++++++++++++++
 11 files changed, 269 insertions(+), 44 deletions(-)

diff --cc CHANGELOG.md
index 910737c,9a5ceee..3cb31d4
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -11,12 -11,8 +11,14 @@@ and this project adheres to [Semantic V
  
  - Log line on start up with sbws version, platform info, and library versions
  (trac#26751)
 +- Manual pages (#26926)
 +
 +### Fixed
 +
 +- Stop deleting the latest.v3bw symlink. Instead, do an atomic rename.
 +  (#26740)
+ - State file for storing the last time `sbws scanner` was started, and able to
+   be used for storing many other types of state in the future. (GH#166)
  
  ### Changed
  
diff --cc README.md
index 49ca638,0fa6118..0b762a2
--- a/README.md
+++ b/README.md
@@@ -131,12 -131,13 +131,14 @@@ In this directory you will fin
  
  - `config.ini` The configuration file you should be editing if you want to
    modify sbws's behavior.
 -- `config.log.ini` The configuration file you should edit if you want to modify
 -  how sbws logs.
 -- `datadir` Once your sbws scanner has started gathering results, it will dump
 +- `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.
 +- `log/` If configured, this directory stores logs generated by all the sbws
 +  commands in rotating log files.
 +- `v3bw/` This directory stores the v3bw files created with `sbws generate`.
+ - `state.dat` A file for storing state needed between sbws commands. See its
+   documentation for more information.
  
  ## Running tests
  
diff --cc sbws/config.default.ini
index 09053a3,121154d..036a987
--- a/sbws/config.default.ini
+++ b/sbws/config.default.ini
@@@ -1,10 -1,8 +1,10 @@@
  [paths]
  datadir = ${sbws_home}/datadir
  v3bw_dname = ${sbws_home}/v3bw
 +# The latest bandwidth file is atomically symlinked to
 +# V3BandwidthsFile ${v3bw_dname}/latest.v3bw
  v3bw_fname = ${v3bw_dname}/{}.v3bw
- started_filepath = ${sbws_home}/started_at
+ state_fname = ${sbws_home}/state.dat
  log_dname = ${sbws_home}/log
  
  [destinations]



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits