process_manager_driver
drunc.process_manager.process_manager_driver
Classes
ProcessManagerDriver(address, token)
Source code in drunc/process_manager/process_manager_driver.py
Methods:
check_port_conflicts(db, session_dal)
Check that the ports allocated in the configuration file are available. If the file is editable, make the changes in the file itself. Otherwise, make the changes in the session_dal, logging the difference.
Note - this logic will go into the run control servuce, where the mapping from OKS files will be run.
Returns db - configuration database object, potentially updated if there were port conflicts session_dal - DAL object, potentially updated if there were port conflicts
Source code in drunc/process_manager/process_manager_driver.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
close()
Close the gRPC channel.
Returns:
| Type | Description |
|---|---|
None
|
None |
Source code in drunc/process_manager/process_manager_driver.py
log_on_server(text, severity='INFO', timeout=60)
Logs a message to the server's log system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The message to log. |
required |
severity
|
str
|
The severity level of the log message. Defaults to "INFO". |
'INFO'
|
timeout
|
int | float
|
The timeout for the gRPC request in seconds. Defaults to 60. |
60
|
Returns:
| Type | Description |
|---|---|
LogOnServerResponse
|
None |
Raises:
| Type | Description |
|---|---|
RpcError
|
If the gRPC request fails. |
Source code in drunc/process_manager/process_manager_driver.py
update_controller_logs(ctrl_dal, level)
Update the log level of the controller in the DAL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctrl_dal
|
The controller DAL object. |
required | |
level
|
The new log level to set. |
required |
Returns:
| Type | Description |
|---|---|
|
The updated controller DAL object. |