MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / update_status

Function update_status

web/pgadmin/misc/bgprocess/process_executor.py:248–269  ·  view source on GitHub ↗

This function will updates process stats Args: kwargs - Process configuration details Returns: None

(**kw)

Source from the content-addressed store, hash-verified

246
247
248def update_status(**kw):
249 """
250 This function will updates process stats
251
252 Args:
253 kwargs - Process configuration details
254
255 Returns:
256 None
257 """
258 import json
259
260 if _out_dir:
261 status = dict(
262 (k, v) for k, v in kw.items()
263 if k in ('start_time', 'end_time', 'exit_code', 'pid')
264 )
265 _log('Updating the status:\n{0}'.format(json.dumps(status)))
266 with open(os.path.join(_out_dir, 'status'), 'w') as fp:
267 json.dump(status, fp)
268 else:
269 raise ValueError("Please verify pid and db_file arguments.")
270
271
272def _handle_execute_exception(ex, args, _stderr, exit_code=None):

Callers 1

executeFunction · 0.85

Calls 3

_logFunction · 0.85
joinMethod · 0.80
dumpMethod · 0.80

Tested by

no test coverage detected