Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set disable_pcon #404

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions BlockServer/runcontrol/runcontrol_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@
MAX_LOOPS_TO_WAIT_FOR_START = 60 # roughly 2 minutes at standard time


def create_db_load_string(block):

Check failure on line 61 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN201)

BlockServer/runcontrol/runcontrol_manager.py:61:5: ANN201 Missing return type annotation for public function `create_db_load_string`

Check failure on line 61 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:61:27: ANN001 Missing type annotation for function argument `block`
load_record_string = 'dbLoadRecords("$(RUNCONTROL)/db/{file}.db", "{macros}")\n'
# PVA is PV Alias, NA is NoAlias
macro_string = "P=$(MYPVPREFIX),PV=$(MYPVPREFIX)CS:SB:{pv},PVA=$(MYPVPREFIX)CS:SB:{pva},NOALIAS={na},NOARCHIVE=$(NOARCHIVE=)"
if block.name == block.name.upper():
return load_record_string.format(
file="runcontrol", macros=macro_string.format(pv=block.name, pva="", na="#")
)
macro_string="P=$(MYPVPREFIX),PV=$(MYPVPREFIX)CS:SB:{pv},PVA=$(MYPVPREFIX)CS:SB:{pva},NOALIAS={na},NOARCHIVE=$(NOARCHIVE=),PINI=YES"
if (block.name == block.name.upper()):
return load_record_string.format(file="runcontrol",
macros=macro_string.format(pv=block.name, pva="", na="#"))
else:
return load_record_string.format(
file="runcontrol",
Expand All @@ -76,15 +75,15 @@
class RunControlManager(OnTheFlyPvInterface):
"""A class for taking care of setting up run-control."""

def __init__(

Check failure on line 78 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN204)

BlockServer/runcontrol/runcontrol_manager.py:78:9: ANN204 Missing return type annotation for special method `__init__`
self,
prefix,

Check failure on line 80 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:80:9: ANN001 Missing type annotation for function argument `prefix`
config_dir,

Check failure on line 81 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:81:9: ANN001 Missing type annotation for function argument `config_dir`
var_dir,

Check failure on line 82 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:82:9: ANN001 Missing type annotation for function argument `var_dir`
ioc_control,

Check failure on line 83 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:83:9: ANN001 Missing type annotation for function argument `ioc_control`
active_configholder,

Check failure on line 84 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:84:9: ANN001 Missing type annotation for function argument `active_configholder`
block_server,

Check failure on line 85 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:85:9: ANN001 Missing type annotation for function argument `block_server`
channel_access=ChannelAccess(),

Check failure on line 86 in BlockServer/runcontrol/runcontrol_manager.py

View workflow job for this annotation

GitHub Actions / call-workflow / ruff

Ruff (ANN001)

BlockServer/runcontrol/runcontrol_manager.py:86:9: ANN001 Missing type annotation for function argument `channel_access`
):
"""
Constructor.
Expand Down
24 changes: 7 additions & 17 deletions DatabaseServer/database_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,29 +149,19 @@ def generate_pv_info() -> dict:
Returns:
Dictionary containing the information to construct PVs
"""
pv_size_1m = 1000000
pv_size_256k = 256000
pv_size_10k = 10000
pv_info = {}

for pv in [
DbPVNames.IOCS,
DbPVNames.HIGH_INTEREST,
DbPVNames.MEDIUM_INTEREST,
DbPVNames.LOW_INTEREST,
DbPVNames.FACILITY,
DbPVNames.ACTIVE_PVS,
DbPVNames.ALL_PVS,
DbPVNames.IOCS_NOT_TO_STOP,
]:
for pv in [DbPVNames.IOCS, DbPVNames.HIGH_INTEREST, DbPVNames.MEDIUM_INTEREST, DbPVNames.LOW_INTEREST,
DbPVNames.FACILITY, DbPVNames.IOCS_NOT_TO_STOP]:
pv_info[pv] = char_waveform(pv_size_256k)

for pv in [
DbPVNames.SAMPLE_PARS,
DbPVNames.BEAMLINE_PARS,
DbPVNames.USER_PARS,
DbPVNames.MOXA_MAPPINGS,
DbPVNames.NUM_MOXAS,
]:
for pv in [DbPVNames.ACTIVE_PVS, DbPVNames.ALL_PVS]:
pv_info[pv] = char_waveform(pv_size_1m)

for pv in [DbPVNames.SAMPLE_PARS, DbPVNames.BEAMLINE_PARS, DbPVNames.USER_PARS, DbPVNames.MOXA_MAPPINGS, DbPVNames.NUM_MOXAS]:
pv_info[pv] = char_waveform(pv_size_10k)

return pv_info
Expand Down
2 changes: 1 addition & 1 deletion server_common/loggers/isis_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def write_to_log(self, message, severity="INFO", src=None):
"""
if src is None:
src = self._ioc_name
msg_time = datetime.datetime.now()
msg_time = datetime.datetime.now(datetime.timezone.utc).astimezone()
IsisLogger.executor.submit(
self._queued_write_to_log,
message,
Expand Down
2 changes: 1 addition & 1 deletion start_blockserver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ REM @echo off
setlocal
set MYDIRBLOCK=%~dp0
call %MYDIRBLOCK%stop_blockserver.bat
set CYGWIN=nodosfilewarning
set CYGWIN=disable_pcon
call %MYDIRBLOCK%..\..\..\config_env_base.bat

set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
Expand Down
2 changes: 1 addition & 1 deletion start_database_server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ REM @echo off
setlocal
set MYDIRBLOCK=%~dp0
call %MYDIRBLOCK%stop_database_server.bat
set CYGWIN=nodosfilewarning
set CYGWIN=disable_pcon
call %MYDIRBLOCK%..\..\..\config_env_base.bat

set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
Expand Down
Loading