pywebexec 1.7.0__py3-none-any.whl → 1.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pywebexec/pywebexec.py CHANGED
@@ -429,6 +429,9 @@ def get_status_file_path(command_id):
429
429
  def get_output_file_path(command_id):
430
430
  return os.path.join(COMMAND_STATUS_DIR, f'{command_id}_output.txt')
431
431
 
432
+ def get_done_file_path(command_id):
433
+ return os.path.join(COMMAND_STATUS_DIR, f'{command_id}.done')
434
+
432
435
  def update_command_status(command_id, updates):
433
436
  status_file_path = get_status_file_path(command_id)
434
437
  status = read_command_status(command_id) or {}
@@ -440,7 +443,10 @@ def update_command_status(command_id, updates):
440
443
  status_cache[command_id] = status
441
444
  with open(status_file_path, 'w') as f:
442
445
  json.dump(status, f)
443
-
446
+ if status.get('status') != 'running':
447
+ open(get_done_file_path(command_id), 'a').close()
448
+
449
+
444
450
  def read_command_status(command_id):
445
451
  # Return cached status if available
446
452
  status_data = {}
@@ -449,6 +455,8 @@ def read_command_status(command_id):
449
455
  status = status_data.get('status')
450
456
  if status and status != "running":
451
457
  return status_data
458
+ if command_id in status_cache and not os.path.exists(get_done_file_path(command_id)):
459
+ return status_data
452
460
  status_file_path = get_status_file_path(command_id)
453
461
  if not os.path.exists(status_file_path):
454
462
  return None
pywebexec/version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.7.0'
16
- __version_tuple__ = version_tuple = (1, 7, 0)
15
+ __version__ = version = '1.7.1'
16
+ __version_tuple__ = version_tuple = (1, 7, 1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -1,6 +1,6 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
- pywebexec/pywebexec.py,sha256=J5cPqvF8OfdKAmuvNiRgVIGsiromBBdK1Nna80tNPro,33006
3
- pywebexec/version.py,sha256=2fEqxujmrV2dsREie2BmOYFLu66FowyHtZT2AoLuIzU,411
2
+ pywebexec/pywebexec.py,sha256=yPag3ijHH1mzI6k6DjyvBms7FNAQ3UH_IPyeCHU-AO8,33323
3
+ pywebexec/version.py,sha256=kn-QYzzAhfbnfKK6EpE9gJz8TDZkEk52evaid1DHkG4,411
4
4
  pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
5
5
  pywebexec/static/css/style.css,sha256=MJHUBpjWL4sLxM7a7DxypmPKaFJQbmA_ESNXsbLviNI,8201
6
6
  pywebexec/static/css/xterm.css,sha256=uo5phWaUiJgcz0DAzv46uoByLLbJLeetYosL1xf68rY,5559
@@ -33,9 +33,9 @@ pywebexec/static/js/xterm/xterm.js.map,sha256=Y7O2Pb-fIS7Z8AC1D5s04_aiW_Jf1f4mCf
33
33
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  pywebexec/templates/index.html,sha256=5h8kLyzAhbvUDU9sEwrGIvD6FxAMcDZLXlN-ldlO8KU,2880
35
35
  pywebexec/templates/popup.html,sha256=3ZqQcE9mYs-RXv0Lfb24zntOlvR137ZYI9mtCZNVAo0,1407
36
- pywebexec-1.7.0.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
37
- pywebexec-1.7.0.dist-info/METADATA,sha256=qEu0SeeVHBVgAhPPeM2Fe8Rhq6RhGNaPudJyJS1t-3k,8000
38
- pywebexec-1.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
39
- pywebexec-1.7.0.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
40
- pywebexec-1.7.0.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
41
- pywebexec-1.7.0.dist-info/RECORD,,
36
+ pywebexec-1.7.1.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
37
+ pywebexec-1.7.1.dist-info/METADATA,sha256=2qLB_f1jdH1RY5hctK3TZcD8_EofCTtsfLp0uYix0Is,8000
38
+ pywebexec-1.7.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
39
+ pywebexec-1.7.1.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
40
+ pywebexec-1.7.1.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
41
+ pywebexec-1.7.1.dist-info/RECORD,,