added filelock
This commit is contained in:
parent
c0fa410d91
commit
71b04eb48a
3 changed files with 25 additions and 8 deletions
|
|
@ -2,14 +2,18 @@
|
||||||
# 2020. 10. 26
|
# 2020. 10. 26
|
||||||
from distribusi.cli import build_argparser, distribusify
|
from distribusi.cli import build_argparser, distribusify
|
||||||
from distribusi import fragments
|
from distribusi import fragments
|
||||||
|
from filelock import Timeout, FileLock
|
||||||
|
|
||||||
parser = build_argparser()
|
lock = FileLock("./data/.lock")
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
data_path = args.directory
|
with lock:
|
||||||
|
parser = build_argparser()
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
freg = fragments.Fragments()
|
data_path = args.directory
|
||||||
freg.preindex(data_path)
|
|
||||||
freg.postindex()
|
|
||||||
|
|
||||||
distribusify(args, data_path, freg)
|
freg = fragments.Fragments()
|
||||||
|
freg.preindex(data_path)
|
||||||
|
freg.postindex()
|
||||||
|
|
||||||
|
distribusify(args, data_path, freg)
|
||||||
|
|
|
||||||
14
poetry.lock
generated
14
poetry.lock
generated
|
|
@ -1,3 +1,11 @@
|
||||||
|
[[package]]
|
||||||
|
name = "filelock"
|
||||||
|
version = "3.0.12"
|
||||||
|
description = "A platform independent file lock."
|
||||||
|
category = "main"
|
||||||
|
optional = false
|
||||||
|
python-versions = "*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "markdown"
|
name = "markdown"
|
||||||
version = "3.3.4"
|
version = "3.3.4"
|
||||||
|
|
@ -28,9 +36,13 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = "^3.8"
|
python-versions = "^3.8"
|
||||||
content-hash = "e17d31e9ee7949d99baf929cdd55b9565284dbe08e81d3cb7691f58cb5a04c74"
|
content-hash = "2122e4cf5f141d6098cc17000ce0ab06dc0caabd0f43e92c3dc7cd88f67b5934"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
|
filelock = [
|
||||||
|
{file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"},
|
||||||
|
{file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"},
|
||||||
|
]
|
||||||
markdown = [
|
markdown = [
|
||||||
{file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"},
|
{file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"},
|
||||||
{file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"},
|
{file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"},
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ python = "^3.8"
|
||||||
Pillow = "^8.3.1"
|
Pillow = "^8.3.1"
|
||||||
python-magic = "^0.4.24"
|
python-magic = "^0.4.24"
|
||||||
Markdown = "^3.3.4"
|
Markdown = "^3.3.4"
|
||||||
|
filelock = "^3.0.12"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue