Created
May 11, 2023 13:46
-
-
Save maxfischer2781/9e3b36a3556f45c880ac54ccfe235ddb to your computer and use it in GitHub Desktop.
APEL HEPScore23 Patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -cB --recursive production/usr/lib/python2.7/site-packages/apel/db/__init__.py patched/usr/lib/python2.7/site-packages/apel/db/__init__.py | |
*** production/usr/lib/python2.7/site-packages/apel/db/__init__.py 2021-03-22 17:42:15.000000000 +0100 | |
--- patched/usr/lib/python2.7/site-packages/apel/db/__init__.py 2023-04-05 10:39:54.000000000 +0200 | |
*************** | |
*** 15,21 **** | |
''' | |
LOGGER_ID = "apeldb" | |
! JOB_MSG_HEADER = "APEL-individual-job-message: v0.3" | |
SUMMARY_MSG_HEADER = "APEL-summary-job-message: v0.2" | |
NORMALISED_SUMMARY_MSG_HEADER = "APEL-summary-job-message: v0.3" | |
SYNC_MSG_HEADER = "APEL-sync-message: v0.1" | |
--- 15,21 ---- | |
''' | |
LOGGER_ID = "apeldb" | |
! JOB_MSG_HEADER = "APEL-individual-job-message: v0.4" | |
SUMMARY_MSG_HEADER = "APEL-summary-job-message: v0.2" | |
NORMALISED_SUMMARY_MSG_HEADER = "APEL-summary-job-message: v0.3" | |
SYNC_MSG_HEADER = "APEL-sync-message: v0.1" | |
diff -cB --recursive production/usr/lib/python2.7/site-packages/apel/db/records/job.py patched/usr/lib/python2.7/site-packages/apel/db/records/job.py | |
*** production/usr/lib/python2.7/site-packages/apel/db/records/job.py 2021-03-22 17:42:15.000000000 +0100 | |
--- patched/usr/lib/python2.7/site-packages/apel/db/records/job.py 2023-04-05 10:24:54.000000000 +0200 | |
*************** | |
*** 48,55 **** | |
self._msg_fields = ["Site", "SubmitHost", "MachineName", "Queue", "LocalJobId", "LocalUserId", | |
"GlobalUserName", "FQAN", "VO", "VOGroup", "VORole", "WallDuration", | |
"CpuDuration", "Processors", "NodeCount", "StartTime", "EndTime", "InfrastructureDescription", "InfrastructureType", | |
! "MemoryReal", "MemoryVirtual", "ServiceLevelType", | |
! "ServiceLevel"] | |
# This list specifies the information that goes in the database. | |
self._db_fields = ["Site", "SubmitHost", "MachineName", "Queue", "LocalJobId", "LocalUserId", | |
--- 48,54 ---- | |
self._msg_fields = ["Site", "SubmitHost", "MachineName", "Queue", "LocalJobId", "LocalUserId", | |
"GlobalUserName", "FQAN", "VO", "VOGroup", "VORole", "WallDuration", | |
"CpuDuration", "Processors", "NodeCount", "StartTime", "EndTime", "InfrastructureDescription", "InfrastructureType", | |
! "MemoryReal", "MemoryVirtual"] | |
# This list specifies the information that goes in the database. | |
self._db_fields = ["Site", "SubmitHost", "MachineName", "Queue", "LocalJobId", "LocalUserId", | |
*************** | |
*** 64,70 **** | |
# Fields which are accepted but currently ignored. | |
self._ignored_fields = ["SubmitHostType", "UpdateTime"] | |
! self._all_fields = self._msg_fields + self._ignored_fields | |
# Fields which will have an integer stored in them | |
self._int_fields = ["WallDuration", "CpuDuration", "Processors", | |
--- 63,69 ---- | |
# Fields which are accepted but currently ignored. | |
self._ignored_fields = ["SubmitHostType", "UpdateTime"] | |
! self._all_fields = self._msg_fields + self._ignored_fields + ["ServiceLevel", "ServiceLevelType"] | |
# Fields which will have an integer stored in them | |
self._int_fields = ["WallDuration", "CpuDuration", "Processors", | |
*************** | |
*** 76,83 **** | |
self._datetime_fields = ["StartTime", "EndTime"] | |
# Acceptable values for the ServiceLevelType field, not case-sensitive | |
! self._valid_slts = ["si2k", "hepspec"] | |
def _check_fields(self): | |
''' | |
--- 75,88 ---- | |
self._datetime_fields = ["StartTime", "EndTime"] | |
# Acceptable values for the ServiceLevelType field, not case-sensitive | |
! self._valid_slts = ["si2k", "hepspec", "hepscore23"] | |
+ def get_msg(self, withhold_dns=False): | |
+ msg = super(JobRecord, self).get_msg(withhold_dns=withhold_dns) | |
+ spec_type = str(self._record_content["ServiceLevelType"]) | |
+ spec_level = str(self._record_content["ServiceLevel"]) | |
+ msg += "ServiceLevel: {%s: %s}\n" % (spec_type, spec_level) | |
+ return msg | |
def _check_fields(self): | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment