File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 99import serius .watcher .dockerWatcher as dockerWatcher
1010import serius .watcher .rancherWatcher as rancherWatcher
1111import sys
12+ from threading import Lock
1213
1314# Home Path
1415homePath = str (Path .home ())
2829logging .basicConfig (level = logging .INFO , format = "%(asctime)s %(name)s.%(funcName)s +%(lineno)s: %(levelname)-3s [%(process)d] %(message)s" )
2930log = logging .getLogger ('Serius' )
3031
32+ # Lock
33+ lock = Lock ()
34+
3135# IP Resolver
3236def resolveDockerIPToDomain (configFileJson ):
3337
38+ lock .acquire ()
39+
3440 if os .path .exists (hostsBackup ):
3541
3642 copyfile (hostsBackup , hostsWrite )
@@ -99,6 +105,7 @@ def resolveDockerIPToDomain(configFileJson):
99105
100106 log .info ("Nothing changed" )
101107
108+ lock .release ()
102109
103110# Main
104111
Original file line number Diff line number Diff line change 99setup (
1010 name = 'serius' ,
1111
12- version = '1.2.1 ' ,
12+ version = '1.2.2 ' ,
1313
1414 description = 'Microservice Docker DNS for Local Linux' ,
1515
You can’t perform that action at this time.
0 commit comments