Warning, /swf-monitor/testbed-schema.dbml is written in an unsupported language. File is not indexed.
0001 Project "None" {
0002 database_type: 'PostgreSQL'
0003 Note: '''None
0004 Last Updated At 12-31-2025 08:56PM UTC'''
0005 }
0006
0007 enum admin.positive_small_integer_logentry_action_flag {
0008 "1" [note: '''Addition''']
0009 "2" [note: '''Change''']
0010 "3" [note: '''Deletion''']
0011 }
0012
0013 enum monitor_app.char_agentworkflowstage_agent_type {
0014 "daqsim" [note: '''DAQ Simulator''']
0015 "data" [note: '''Data Agent''']
0016 "processing" [note: '''Processing Agent''']
0017 "fastmon" [note: '''Fast Monitoring Agent''']
0018 "monitor" [note: '''Monitor System''']
0019 }
0020
0021 enum monitor_app.char_agentworkflowstage_status {
0022 "generated" [note: '''Generated by DAQ''']
0023 "daqsim_received" [note: '''Received by DAQSIM Agent''']
0024 "daqsim_processing" [note: '''DAQSIM Agent Processing''']
0025 "daqsim_complete" [note: '''DAQSIM Agent Complete''']
0026 "data_received" [note: '''Received by Data Agent''']
0027 "data_processing" [note: '''Data Agent Processing''']
0028 "data_complete" [note: '''Data Agent Complete''']
0029 "processing_received" [note: '''Received by Processing Agent''']
0030 "processing_processing" [note: '''Processing Agent Processing''']
0031 "processing_complete" [note: '''Processing Agent Complete''']
0032 "fastmon_received" [note: '''Received by FastMon Agent''']
0033 "fastmon_processing" [note: '''FastMon Agent Processing''']
0034 "fastmon_complete" [note: '''FastMon Agent Complete''']
0035 "workflow_complete" [note: '''Workflow Complete''']
0036 "failed" [note: '''Failed''']
0037 }
0038
0039 enum monitor_app.char_fastmonfile_status {
0040 "registered" [note: '''Registered''']
0041 "processing" [note: '''Processing''']
0042 "processed" [note: '''Processed''']
0043 "failed" [note: '''Failed''']
0044 "done" [note: '''Done''']
0045 }
0046
0047 enum monitor_app.char_stffile_status {
0048 "registered" [note: '''Registered''']
0049 "processing" [note: '''Processing''']
0050 "processed" [note: '''Processed''']
0051 "failed" [note: '''Failed''']
0052 "done" [note: '''Done''']
0053 }
0054
0055 enum monitor_app.char_stfworkflow_current_agent {
0056 "daqsim" [note: '''DAQ Simulator''']
0057 "data" [note: '''Data Agent''']
0058 "processing" [note: '''Processing Agent''']
0059 "fastmon" [note: '''Fast Monitoring Agent''']
0060 "monitor" [note: '''Monitor System''']
0061 }
0062
0063 enum monitor_app.char_stfworkflow_current_status {
0064 "generated" [note: '''Generated by DAQ''']
0065 "daqsim_received" [note: '''Received by DAQSIM Agent''']
0066 "daqsim_processing" [note: '''DAQSIM Agent Processing''']
0067 "daqsim_complete" [note: '''DAQSIM Agent Complete''']
0068 "data_received" [note: '''Received by Data Agent''']
0069 "data_processing" [note: '''Data Agent Processing''']
0070 "data_complete" [note: '''Data Agent Complete''']
0071 "processing_received" [note: '''Received by Processing Agent''']
0072 "processing_processing" [note: '''Processing Agent Processing''']
0073 "processing_complete" [note: '''Processing Agent Complete''']
0074 "fastmon_received" [note: '''Received by FastMon Agent''']
0075 "fastmon_processing" [note: '''FastMon Agent Processing''']
0076 "fastmon_complete" [note: '''FastMon Agent Complete''']
0077 "workflow_complete" [note: '''Workflow Complete''']
0078 "failed" [note: '''Failed''']
0079 }
0080
0081 enum monitor_app.char_stfworkflow_daq_state {
0082 "no_beam" [note: '''No Beam''']
0083 "beam" [note: '''Beam''']
0084 "run" [note: '''Run''']
0085 "calib" [note: '''Calibration''']
0086 "test" [note: '''Test''']
0087 }
0088
0089 enum monitor_app.char_stfworkflow_daq_substate {
0090 "not_ready" [note: '''Not Ready''']
0091 "ready" [note: '''Ready''']
0092 "physics" [note: '''Physics''']
0093 "standby" [note: '''Standby''']
0094 "lumi" [note: '''Luminosity''']
0095 "eic" [note: '''EIC''']
0096 "epic" [note: '''ePIC''']
0097 "daq" [note: '''DAQ''']
0098 "calib" [note: '''Calibration''']
0099 }
0100
0101 enum monitor_app.char_subscriber_delivery_type {
0102 "activemq" [note: '''ActiveMQ Direct''']
0103 "sse" [note: '''Server-Sent Events''']
0104 }
0105
0106 enum monitor_app.char_systemagent_agent_type {
0107 "daqsim" [note: '''DAQ Simulator''']
0108 "data" [note: '''Data Agent''']
0109 "processing" [note: '''Processing Agent''']
0110 "fastmon" [note: '''Fast Monitoring Agent''']
0111 "workflow_runner" [note: '''Workflow Runner''']
0112 "monitor" [note: '''Monitor System''']
0113 "sse_sender" [note: '''SSE Test Sender''']
0114 "sse_receiver" [note: '''SSE Client/Receiver''']
0115 "test" [note: '''Test Agent''']
0116 "other" [note: '''Other''']
0117 }
0118
0119 enum monitor_app.char_systemagent_status {
0120 "UNKNOWN" [note: '''Unknown''']
0121 "OK" [note: '''OK''']
0122 "WARNING" [note: '''Warning''']
0123 "ERROR" [note: '''Error''']
0124 }
0125
0126 enum monitor_app.char_workflowmessage_recipient_type {
0127 "daqsim" [note: '''DAQ Simulator''']
0128 "data" [note: '''Data Agent''']
0129 "processing" [note: '''Processing Agent''']
0130 "fastmon" [note: '''Fast Monitoring Agent''']
0131 "monitor" [note: '''Monitor System''']
0132 }
0133
0134 enum monitor_app.char_workflowmessage_sender_type {
0135 "daqsim" [note: '''DAQ Simulator''']
0136 "data" [note: '''Data Agent''']
0137 "processing" [note: '''Processing Agent''']
0138 "fastmon" [note: '''Fast Monitoring Agent''']
0139 "monitor" [note: '''Monitor System''']
0140 }
0141
0142 enum monitor_app.integer_applog_level {
0143 "50" [note: '''CRITICAL''']
0144 "40" [note: '''ERROR''']
0145 "30" [note: '''WARNING''']
0146 "20" [note: '''INFO''']
0147 "10" [note: '''DEBUG''']
0148 "0" [note: '''NOTSET''']
0149 }
0150
0151 Table admin.LogEntry {
0152 Note: '''
0153 LogEntry(id, action_time, user, content_type, object_id, object_repr, action_flag, change_message)
0154
0155 *DB table: django_admin_log*'''
0156
0157 id auto [pk, unique, not null]
0158 action_time date_time [default:`django.utils.timezone.now()`, not null]
0159 user_id foreign_key [not null]
0160 content_type_id foreign_key [null]
0161 object_id text [null]
0162 object_repr char [not null]
0163 action_flag admin.positive_small_integer_logentry_action_flag [not null]
0164 change_message text [not null]
0165
0166 indexes {
0167 (content_type_id) [name: 'django_admin_log_content_type_id_c4bce8eb', type: btree]
0168 (id) [pk, unique, name: 'django_admin_log_pkey', type: btree]
0169 (user_id) [name: 'django_admin_log_user_id_c564eba6', type: btree]
0170 }
0171 }
0172 ref: admin.LogEntry.user_id > auth.User.id
0173 ref: admin.LogEntry.content_type_id > contenttypes.ContentType.id
0174
0175
0176 Table auth.Group {
0177 Note: '''
0178 Groups are a generic way of categorizing users to apply permissions, or
0179 some other label, to those users. A user can belong to any number of
0180 groups.
0181
0182 A user in a group automatically has all the permissions granted to that
0183 group. For example, if the group 'Site editors' has the permission
0184 can_edit_home_page, any user in that group will have that permission.
0185
0186 Beyond permissions, groups are a convenient way to categorize users to
0187 apply some label, or extended functionality, to them. For example, you
0188 could create a group 'Special users', and you could write code that would
0189 do special things to those users -- such as giving them access to a
0190 members-only portion of your site, or sending them members-only email
0191 messages.
0192
0193
0194 *DB table: auth_group*'''
0195
0196 id auto [pk, unique, not null]
0197 name char [unique, not null]
0198
0199 indexes {
0200 (name) [unique, name: 'auth_group_name_key', type: btree]
0201 (id) [pk, unique, name: 'auth_group_pkey', type: btree]
0202 }
0203 }
0204
0205
0206 Table auth.Permission {
0207 Note: '''
0208 The permissions system provides a way to assign permissions to specific
0209 users and groups of users.
0210
0211 The permission system is used by the Django admin site, but may also be
0212 useful in your own code. The Django admin site uses permissions as follows:
0213
0214 - The "add" permission limits the user's ability to view the "add" form
0215 and add an object.
0216 - The "change" permission limits a user's ability to view the change
0217 list, view the "change" form and change an object.
0218 - The "delete" permission limits the ability to delete an object.
0219 - The "view" permission limits the ability to view an object.
0220
0221 Permissions are set globally per type of object, not per specific object
0222 instance. It is possible to say "Mary may change news stories," but it's
0223 not currently possible to say "Mary may change news stories, but only the
0224 ones she created herself" or "Mary may only change news stories that have a
0225 certain status or publication date."
0226
0227 The permissions listed above are automatically created for each model.
0228
0229
0230 *DB table: auth_permission*'''
0231
0232 id auto [pk, unique, not null]
0233 name char [not null]
0234 content_type_id foreign_key [not null]
0235 codename char [not null]
0236
0237 indexes {
0238 (content_type_id) [name: 'auth_permission_content_type_id_2f476e4b', type: btree]
0239 (content_type_id,codename) [unique, name: 'auth_permission_content_type_id_codename_01ab375a_uniq', type: btree]
0240 (id) [pk, unique, name: 'auth_permission_pkey', type: btree]
0241 }
0242 }
0243 ref: auth.Permission.content_type_id > contenttypes.ContentType.id
0244
0245
0246 Table auth.User {
0247 Note: '''
0248 Users within the Django authentication system are represented by this
0249 model.
0250
0251 Username and password are required. Other fields are optional.
0252
0253
0254 *DB table: auth_user*'''
0255
0256 id auto [pk, unique, not null]
0257 password char [not null]
0258 last_login date_time [null]
0259 is_superuser boolean [note: '''Designates that this user has all permissions without explicitly assigning them.''', default:`False`, not null]
0260 username char [note: '''Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.''', unique, not null]
0261 first_name char [not null]
0262 last_name char [not null]
0263 email email [not null]
0264 is_staff boolean [note: '''Designates whether the user can log into this admin site.''', default:`False`, not null]
0265 is_active boolean [note: '''Designates whether this user should be treated as active. Unselect this instead of deleting accounts.''', default:`True`, not null]
0266 date_joined date_time [default:`django.utils.timezone.now()`, not null]
0267
0268 indexes {
0269 (id) [pk, unique, name: 'auth_user_pkey', type: btree]
0270 (username) [unique, name: 'auth_user_username_key', type: btree]
0271 }
0272 }
0273
0274
0275 Table auth.group_permissions {
0276 Note: '''
0277 This is a Many-To-Many linking table autogenerated by Django.
0278
0279 *DB table: auth_group_permissions*'''
0280
0281 id auto [pk, not null]
0282 permission_id auto
0283 group_id auto
0284
0285 indexes {
0286 (group_id) [name: 'auth_group_permissions_group_id_b120cbf9', type: btree]
0287 (group_id,permission_id) [unique, name: 'auth_group_permissions_group_id_permission_id_0cd325b0_uniq', type: btree]
0288 (permission_id) [name: 'auth_group_permissions_permission_id_84c5c92e', type: btree]
0289 (id) [pk, unique, name: 'auth_group_permissions_pkey', type: btree]
0290 }
0291 }
0292 ref: auth.Group.id > auth.group_permissions.group_id
0293 ref: auth.Permission.id > auth.group_permissions.permission_id
0294
0295
0296 Table auth.user_groups {
0297 Note: '''
0298 This is a Many-To-Many linking table autogenerated by Django.
0299
0300 *DB table: auth_user_groups*'''
0301
0302 id auto [pk, not null]
0303 group_id auto
0304 user_id auto
0305
0306 indexes {
0307 (group_id) [name: 'auth_user_groups_group_id_97559544', type: btree]
0308 (id) [pk, unique, name: 'auth_user_groups_pkey', type: btree]
0309 (user_id) [name: 'auth_user_groups_user_id_6a12ed8b', type: btree]
0310 (user_id,group_id) [unique, name: 'auth_user_groups_user_id_group_id_94350c0c_uniq', type: btree]
0311 }
0312 }
0313 ref: auth.User.id > auth.user_groups.user_id
0314 ref: auth.Group.id > auth.user_groups.group_id
0315
0316
0317 Table auth.user_user_permissions {
0318 Note: '''
0319 This is a Many-To-Many linking table autogenerated by Django.
0320
0321 *DB table: auth_user_user_permissions*'''
0322
0323 id auto [pk, not null]
0324 permission_id auto
0325 user_id auto
0326
0327 indexes {
0328 (permission_id) [name: 'auth_user_user_permissions_permission_id_1fbb5f2c', type: btree]
0329 (id) [pk, unique, name: 'auth_user_user_permissions_pkey', type: btree]
0330 (user_id) [name: 'auth_user_user_permissions_user_id_a95ead1b', type: btree]
0331 (user_id,permission_id) [unique, name: 'auth_user_user_permissions_user_id_permission_id_14a6b632_uniq', type: btree]
0332 }
0333 }
0334 ref: auth.User.id > auth.user_user_permissions.user_id
0335 ref: auth.Permission.id > auth.user_user_permissions.permission_id
0336
0337
0338 Table authtoken.Token {
0339 Note: '''
0340 The default authorization token model.
0341
0342
0343 *DB table: authtoken_token*'''
0344
0345 key char [pk, unique, not null]
0346 user_id one_to_one [unique, not null]
0347 created date_time [not null]
0348
0349 indexes {
0350 (key) [pk, unique, name: 'authtoken_token_pkey', type: btree]
0351 (user_id) [unique, name: 'authtoken_token_user_id_key', type: btree]
0352 }
0353 }
0354 ref: authtoken.Token.user_id - auth.User.id
0355
0356
0357 Table authtoken.TokenProxy {
0358 Note: '''
0359 Proxy mapping pk to user pk for use in admin.
0360
0361
0362 *DB table: authtoken_token*'''
0363
0364 key char [pk, unique, not null]
0365 user_id one_to_one [unique, not null]
0366 created date_time [not null]
0367
0368 indexes {
0369 (key) [pk, unique, name: 'authtoken_token_pkey', type: btree]
0370 (user_id) [unique, name: 'authtoken_token_user_id_key', type: btree]
0371 }
0372 }
0373 ref: authtoken.TokenProxy.user_id - auth.User.id
0374
0375
0376 Table contenttypes.ContentType {
0377 Note: '''
0378 ContentType(id, app_label, model)
0379
0380 *DB table: django_content_type*'''
0381
0382 id auto [pk, unique, not null]
0383 app_label char [not null]
0384 model char [not null]
0385
0386 indexes {
0387 (app_label,model) [unique, name: 'django_content_type_app_label_model_76bd3d3b_uniq', type: btree]
0388 (id) [pk, unique, name: 'django_content_type_pkey', type: btree]
0389 }
0390 }
0391
0392
0393 Table monitor_app.AgentWorkflowStage {
0394 Note: '''
0395 Tracks individual agent processing stages within an STF workflow.
0396
0397 This model records when each agent receives, processes, and completes work on an STF,
0398 providing detailed timing and status information for performance monitoring.
0399
0400
0401 *DB table: swf_agent_workflow_stages*'''
0402
0403 stage_id uuid [pk, unique, default:`uuid.uuid4()`, not null]
0404 workflow_id foreign_key [not null]
0405 agent_name char [not null]
0406 agent_type monitor_app.char_agentworkflowstage_agent_type [not null]
0407 status monitor_app.char_agentworkflowstage_status [default:`"generated"`, not null]
0408 received_at date_time [null]
0409 started_at date_time [null]
0410 completed_at date_time [null]
0411 failed_at date_time [null]
0412 processing_time_seconds float [null]
0413 failure_reason text [null]
0414 input_message json [null]
0415 output_message json [null]
0416 stage_metadata json [null]
0417 created_at date_time [not null]
0418 updated_at date_time [not null]
0419
0420 indexes {
0421 (agent_name,status) [name: 'swf_agent_w_agent_n_998699_idx', type: btree]
0422 (received_at) [name: 'swf_agent_w_receive_6c232f_idx', type: btree]
0423 (workflow_id,agent_type) [name: 'swf_agent_w_workflo_2375d6_idx', type: btree]
0424 (workflow_id,agent_name,agent_type) [unique, name: 'swf_agent_workflow_stage_workflow_id_agent_name_a_fc327599_uniq', type: btree]
0425 (stage_id) [pk, unique, name: 'swf_agent_workflow_stages_pkey', type: btree]
0426 (workflow_id) [name: 'swf_agent_workflow_stages_workflow_id_060467ec', type: btree]
0427 }
0428 }
0429 ref: monitor_app.AgentWorkflowStage.workflow_id > monitor_app.STFWorkflow.workflow_id
0430
0431
0432 Table monitor_app.AppLog {
0433 Note: '''
0434 AppLog(id, app_name, instance_name, timestamp, level, levelname, message, module, funcname, lineno, process, thread, extra_data)
0435
0436 *DB table: swf_applog*'''
0437
0438 id big_auto [pk, unique, not null]
0439 app_name char [not null]
0440 instance_name char [not null]
0441 timestamp date_time [not null]
0442 level monitor_app.integer_applog_level [default:`0`, not null]
0443 levelname char [not null]
0444 message text [not null]
0445 module char [not null]
0446 funcname char [not null]
0447 lineno integer [not null]
0448 process integer [not null]
0449 thread big_integer [not null]
0450 extra_data json [null]
0451
0452 indexes {
0453 (app_name) [name: 'swf_applog_app_name_66f0dc0f', type: btree]
0454 (instance_name) [name: 'swf_applog_instance_name_9c1c173c', type: btree]
0455 (level) [name: 'swf_applog_level_45df2d72', type: btree]
0456 (id) [pk, unique, name: 'swf_applog_pkey', type: btree]
0457 (timestamp,app_name,instance_name) [name: 'swf_applog_timesta_ad9cbc_idx', type: btree]
0458 (timestamp) [name: 'swf_applog_timestamp_fb0b69c3', type: btree]
0459 }
0460 }
0461
0462
0463 Table monitor_app.FastMonFile {
0464 Note: '''
0465 Represents a Time Frame (TF) file for fast monitoring.
0466 TF files are subsamples of Super Time Frame (STF) files, processed for rapid monitoring.
0467
0468 Attributes:
0469 tf_file_id: UUID primary key for unique TF file identification
0470 stf_file: Foreign key to the parent STF file this TF is derived from
0471 tf_filename: Unique filename for the TF file
0472 file_size_bytes: Size of the TF file in bytes
0473 checksum: File integrity checksum
0474 status: Current processing status (FileStatus enum)
0475 metadata: JSON field for flexible storage of TF-specific metadata
0476 created_at: Timestamp when TF record was created
0477 updated_at: Timestamp when TF record was last modified
0478
0479
0480 *DB table: swf_fastmon_files*'''
0481
0482 tf_file_id uuid [pk, unique, default:`uuid.uuid4()`, not null]
0483 stf_file_id foreign_key [not null]
0484 tf_filename char [unique, not null]
0485 file_size_bytes big_integer [null]
0486 checksum char [null]
0487 status monitor_app.char_fastmonfile_status [default:`"registered"`, not null]
0488 metadata json [null]
0489 created_at date_time [not null]
0490 updated_at date_time [not null]
0491
0492 indexes {
0493 (tf_file_id) [pk, unique, name: 'swf_fastmon_files_pkey', type: btree]
0494 (stf_file_id) [name: 'swf_fastmon_files_stf_file_id_5994a143', type: btree]
0495 (tf_filename) [unique, name: 'swf_fastmon_files_tf_filename_key', type: btree]
0496 }
0497 }
0498 ref: monitor_app.FastMonFile.stf_file_id > monitor_app.StfFile.file_id
0499
0500
0501 Table monitor_app.Namespace {
0502 Note: '''
0503 Testbed namespace for workflow isolation and multi-user environments.
0504 Namespaces group agents, executions, and messages for a particular user or purpose.
0505
0506
0507 *DB table: swf_namespace*'''
0508
0509 name char [pk, unique, not null]
0510 owner char [note: '''Username of namespace owner''', not null]
0511 description text [not null]
0512 metadata json [null]
0513 created_at date_time [not null]
0514 updated_at date_time [not null]
0515
0516 indexes {
0517 (name) [pk, unique, name: 'swf_namespace_pkey', type: btree]
0518 }
0519 }
0520
0521
0522 Table monitor_app.PandaQueue {
0523 Note: '''
0524 Represents a PanDA compute queue configuration.
0525 Stores the queue name and full configuration as JSON.
0526
0527
0528 *DB table: swf_panda_queues*'''
0529
0530 queue_name char [pk, unique, not null]
0531 site char [not null]
0532 status char [default:`"active"`, not null]
0533 queue_type char [not null]
0534 config_data json [not null]
0535 created_at date_time [not null]
0536 updated_at date_time [not null]
0537
0538 indexes {
0539 (queue_name) [pk, unique, name: 'swf_panda_queues_pkey', type: btree]
0540 }
0541 }
0542
0543
0544 Table monitor_app.PersistentState {
0545 Note: '''
0546 Persistent state store with stable schema - just stores JSON.
0547 Never modify this schema - it must remain stable across all deployments.
0548
0549 Single record stores all persistent state as JSON blob.
0550 Use get_state() and update_state() methods to access nested data.
0551
0552
0553 *DB table: swf_persistent_state*'''
0554
0555 id auto [pk, unique, not null]
0556 state_data json [default:`builtins.dict()`, not null]
0557 updated_at date_time [not null]
0558
0559 indexes {
0560 (id) [pk, unique, name: 'swf_persistent_state_pkey', type: btree]
0561 }
0562 }
0563
0564
0565 Table monitor_app.RucioEndpoint {
0566 Note: '''
0567 Represents a Rucio DDM (Distributed Data Management) endpoint configuration.
0568 Stores the endpoint name and full configuration as JSON.
0569
0570
0571 *DB table: swf_rucio_endpoints*'''
0572
0573 endpoint_name char [pk, unique, not null]
0574 site char [not null]
0575 endpoint_type char [not null]
0576 is_tape boolean [default:`False`, not null]
0577 is_active boolean [default:`True`, not null]
0578 config_data json [not null]
0579 created_at date_time [not null]
0580 updated_at date_time [not null]
0581
0582 indexes {
0583 (endpoint_name) [pk, unique, name: 'swf_rucio_endpoints_pkey', type: btree]
0584 }
0585 }
0586
0587
0588 Table monitor_app.Run {
0589 Note: '''
0590 Represents a data-taking run in the ePIC detector system.
0591
0592 Attributes:
0593 run_id: Auto-incrementing primary key
0594 run_number: Unique identifier for the run, defined by DAQ
0595 start_time: When the run began
0596 end_time: When the run ended (null if still active)
0597 run_conditions: JSON field storing experimental conditions
0598
0599
0600 *DB table: swf_runs*'''
0601
0602 run_id auto [pk, unique, not null]
0603 run_number integer [unique, not null]
0604 start_time date_time [not null]
0605 end_time date_time [null]
0606 run_conditions json [null]
0607
0608 indexes {
0609 (run_id) [pk, unique, name: 'swf_runs_pkey', type: btree]
0610 (run_number) [unique, name: 'swf_runs_run_number_key', type: btree]
0611 }
0612 }
0613
0614
0615 Table monitor_app.RunState {
0616 Note: '''
0617 Tracks the current processing state for each run in the fast processing workflow.
0618 Provides quick access to run-level statistics and status.
0619
0620
0621 *DB table: swf_run_state*'''
0622
0623 run_number integer [pk, unique, not null]
0624 phase char [not null]
0625 state char [not null]
0626 substate char [null]
0627 target_worker_count integer [not null]
0628 active_worker_count integer [default:`0`, not null]
0629 stf_samples_received integer [default:`0`, not null]
0630 slices_created integer [default:`0`, not null]
0631 slices_queued integer [default:`0`, not null]
0632 slices_processing integer [default:`0`, not null]
0633 slices_completed integer [default:`0`, not null]
0634 slices_failed integer [default:`0`, not null]
0635 state_changed_at date_time [not null]
0636 updated_at date_time [not null]
0637 metadata json [null]
0638
0639 indexes {
0640 (run_number) [pk, unique, name: 'swf_run_state_pkey', type: btree]
0641 }
0642 }
0643
0644
0645 Table monitor_app.STFWorkflow {
0646 Note: '''
0647 Tracks the complete workflow lifecycle of a Super Time Frame from generation to completion.
0648
0649 This model extends the existing StfFile model concept to include workflow-specific fields
0650 and tracks the STF as it moves through different agents in the pipeline.
0651
0652
0653 *DB table: swf_stf_workflows*'''
0654
0655 workflow_id uuid [pk, unique, default:`uuid.uuid4()`, not null]
0656 filename char [unique, not null]
0657 file_id uuid [null]
0658 namespace char [note: '''Testbed namespace for workflow delineation''', null]
0659 execution_id char [note: '''Workflow execution instance ID''', null]
0660 run_id char [note: '''Run number within execution''', null]
0661 daq_state monitor_app.char_stfworkflow_daq_state [not null]
0662 daq_substate monitor_app.char_stfworkflow_daq_substate [not null]
0663 generated_time date_time [not null]
0664 stf_start_time date_time [not null]
0665 stf_end_time date_time [not null]
0666 current_status monitor_app.char_stfworkflow_current_status [default:`"generated"`, not null]
0667 current_agent monitor_app.char_stfworkflow_current_agent [default:`"daqsim"`, not null]
0668 completed_at date_time [null]
0669 failed_at date_time [null]
0670 failure_reason text [null]
0671 stf_metadata json [null]
0672 created_at date_time [not null]
0673 updated_at date_time [not null]
0674
0675 indexes {
0676 (current_status,generated_time) [name: 'swf_stf_wor_current_2362bd_idx', type: btree]
0677 (current_agent) [name: 'swf_stf_wor_current_b6bc73_idx', type: btree]
0678 (daq_state,daq_substate) [name: 'swf_stf_wor_daq_sta_d7effc_idx', type: btree]
0679 (namespace,run_id) [name: 'swf_stf_wor_namespa_22a7e6_idx', type: btree]
0680 (namespace,execution_id) [name: 'swf_stf_wor_namespa_e6efb3_idx', type: btree]
0681 (execution_id) [name: 'swf_stf_workflows_execution_id_101eace0', type: btree]
0682 (filename) [unique, name: 'swf_stf_workflows_filename_key', type: btree]
0683 (namespace) [name: 'swf_stf_workflows_namespace_f373e34c', type: btree]
0684 (workflow_id) [pk, unique, name: 'swf_stf_workflows_pkey', type: btree]
0685 (run_id) [name: 'swf_stf_workflows_run_id_eb2b160c', type: btree]
0686 }
0687 }
0688
0689
0690 Table monitor_app.StfFile {
0691 Note: '''
0692 Represents a Super Time Frame (STF) file in the data acquisition system.
0693 Each file is tracked with metadata, processing status, and location
0694 information for monitoring and message queue dispatch.
0695
0696 Attributes:
0697 file_id: UUID primary key for unique file identification
0698 run: Foreign key to the associated Run
0699 machine_state: Detector state during data collection (e.g., "physics", "cosmics")
0700 file_url: URL location of the STF file, intended for remote access
0701 file_size_bytes: Size of the file in bytes
0702 checksum: File integrity checksum
0703 created_at: Timestamp when file record was created
0704 status: Current processing status (FileStatus enum)
0705 metadata: JSON field for additional file metadata
0706
0707
0708 *DB table: swf_stf_files*'''
0709
0710 file_id uuid [pk, unique, default:`uuid.uuid4()`, not null]
0711 run_id foreign_key [not null]
0712 machine_state char [default:`"physics"`, not null]
0713 stf_filename char [unique, not null]
0714 file_size_bytes big_integer [null]
0715 checksum char [null]
0716 created_at date_time [not null]
0717 status monitor_app.char_stffile_status [default:`"registered"`, not null]
0718 metadata json [null]
0719 workflow_id uuid [null]
0720 daq_state char [null]
0721 daq_substate char [null]
0722 workflow_status char [null]
0723
0724 indexes {
0725 (file_id) [pk, unique, name: 'swf_stf_files_pkey', type: btree]
0726 (run_id) [name: 'swf_stf_files_run_id_9a2165d5', type: btree]
0727 (stf_filename) [unique, name: 'swf_stf_files_stf_filename_key', type: btree]
0728 (workflow_id) [name: 'swf_stf_files_workflow_id_055cc696', type: btree]
0729 }
0730 }
0731 ref: monitor_app.StfFile.run_id > monitor_app.Run.run_id
0732
0733
0734 Table monitor_app.Subscriber {
0735 Note: '''
0736 Represents a message queue subscriber in the monitoring system.
0737 Subscribers receive notifications about STF files via ActiveMQ directly or SSE.
0738
0739 Attributes:
0740 subscriber_id: Auto-incrementing primary key
0741 subscriber_name: Unique name identifying the subscriber
0742 fraction: Fraction of messages to receive
0743 description: Human-readable description of the subscriber
0744 is_active: Whether the subscriber is currently active
0745 created_at: Timestamp when record was created
0746 updated_at: Timestamp when record was last updated
0747 delivery_type: How messages are delivered (activemq or sse)
0748 client_ip: IP address for SSE subscribers
0749 client_location: Geographic location for SSE subscribers
0750 connected_at: When SSE subscriber connected
0751 disconnected_at: When SSE subscriber disconnected
0752 last_activity: Last activity timestamp for SSE subscribers
0753 message_filters: JSON filters for SSE message selection
0754 messages_received: Count of messages received
0755 messages_sent: Count of messages sent (SSE)
0756 messages_dropped: Count of messages dropped due to queue overflow (SSE)
0757
0758
0759 *DB table: swf_subscribers*'''
0760
0761 subscriber_id auto [pk, unique, not null]
0762 subscriber_name char [unique, not null]
0763 fraction float [null]
0764 description text [null]
0765 is_active boolean [default:`True`, not null]
0766 created_at date_time [not null]
0767 updated_at date_time [not null]
0768 delivery_type monitor_app.char_subscriber_delivery_type [default:`"activemq"`, not null]
0769 client_ip generic_ip_address [null]
0770 client_location char [default:`""`, not null]
0771 connected_at date_time [null]
0772 disconnected_at date_time [null]
0773 last_activity date_time [null]
0774 message_filters json [default:`builtins.dict()`, not null]
0775 messages_received integer [default:`0`, not null]
0776 messages_sent integer [default:`0`, not null]
0777 messages_dropped integer [default:`0`, not null]
0778
0779 indexes {
0780 (delivery_type,is_active) [name: 'swf_subscri_deliver_1836c2_idx', type: btree]
0781 (subscriber_id) [pk, unique, name: 'swf_subscribers_pkey', type: btree]
0782 (subscriber_name) [unique, name: 'swf_subscribers_subscriber_name_key', type: btree]
0783 }
0784 }
0785
0786
0787 Table monitor_app.SystemAgent {
0788 Note: '''
0789 SystemAgent(id, instance_name, agent_type, description, status, last_heartbeat, agent_url, workflow_enabled, current_stf_count, total_stf_processed, last_stf_processed, namespace, metadata, created_at, updated_at)
0790
0791 *DB table: swf_systemagent*'''
0792
0793 id big_auto [pk, unique, not null]
0794 instance_name char [unique, not null]
0795 agent_type monitor_app.char_systemagent_agent_type [not null]
0796 description text [not null]
0797 status monitor_app.char_systemagent_status [default:`"UNKNOWN"`, not null]
0798 last_heartbeat date_time [null]
0799 agent_url url [null]
0800 workflow_enabled boolean [default:`True`, not null]
0801 current_stf_count integer [default:`0`, not null]
0802 total_stf_processed integer [default:`0`, not null]
0803 last_stf_processed date_time [null]
0804 namespace char [note: '''Testbed namespace for workflow delineation''', null]
0805 metadata json [note: '''Extensible metadata for agent configuration and state''', null]
0806 created_at date_time [not null]
0807 updated_at date_time [not null]
0808
0809 indexes {
0810 (instance_name) [unique, name: 'swf_systemagent_instance_name_key', type: btree]
0811 (namespace) [name: 'swf_systemagent_namespace_095b5b2c', type: btree]
0812 (id) [pk, unique, name: 'swf_systemagent_pkey', type: btree]
0813 }
0814 }
0815
0816
0817 Table monitor_app.SystemStateEvent {
0818 Note: '''
0819 Event log for time-travel replay of system state.
0820 Records all significant events in the fast processing workflow.
0821
0822
0823 *DB table: swf_system_state_events*'''
0824
0825 event_id auto [pk, unique, not null]
0826 timestamp date_time [not null]
0827 run_number integer [not null]
0828 event_type char [not null]
0829 state char [not null]
0830 substate char [null]
0831 event_data json [not null]
0832
0833 indexes {
0834 (timestamp,run_number) [name: 'swf_system__timesta_12647a_idx', type: btree]
0835 (event_type) [name: 'swf_system_state_events_event_type_e0d9fd67', type: btree]
0836 (event_id) [pk, unique, name: 'swf_system_state_events_pkey', type: btree]
0837 (run_number) [name: 'swf_system_state_events_run_number_ec8a21e7', type: btree]
0838 (state) [name: 'swf_system_state_events_state_fe4ff0e9', type: btree]
0839 (substate) [name: 'swf_system_state_events_substate_62dc981d', type: btree]
0840 (timestamp) [name: 'swf_system_state_events_timestamp_54e337bf', type: btree]
0841 }
0842 }
0843
0844
0845 Table monitor_app.TFSlice {
0846 Note: '''
0847 Represents a Time Frame slice for fast processing workflow.
0848 Each TF slice is a small portion (~15 per STF sample) that can be
0849 processed independently by workers in ~30 seconds.
0850
0851
0852 *DB table: swf_tf_slices*'''
0853
0854 id big_auto [pk, unique, not null]
0855 slice_id integer [not null]
0856 tf_first integer [not null]
0857 tf_last integer [not null]
0858 tf_count integer [not null]
0859 tf_filename char [not null]
0860 stf_filename char [not null]
0861 run_number integer [not null]
0862 status char [default:`"queued"`, not null]
0863 retries integer [default:`0`, not null]
0864 metadata json [null]
0865 created_at date_time [not null]
0866 updated_at date_time [not null]
0867 assigned_worker char [null]
0868 assigned_at date_time [null]
0869 completed_at date_time [null]
0870
0871 indexes {
0872 (run_number,status) [name: 'swf_tf_slic_run_num_783be1_idx', type: btree]
0873 (status,created_at) [name: 'swf_tf_slic_status_a09d78_idx', type: btree]
0874 (stf_filename,status) [name: 'swf_tf_slic_stf_fil_45fc7b_idx', type: btree]
0875 (id) [pk, unique, name: 'swf_tf_slices_pkey', type: btree]
0876 (run_number) [name: 'swf_tf_slices_run_number_7f432352', type: btree]
0877 (stf_filename) [name: 'swf_tf_slices_stf_filename_013bb220', type: btree]
0878 (tf_filename) [name: 'swf_tf_slices_tf_filename_3fa6f280', type: btree]
0879 (tf_filename,slice_id) [unique, name: 'swf_tf_slices_tf_filename_slice_id_2ea501ba_uniq', type: btree]
0880 }
0881 }
0882
0883
0884 Table monitor_app.Worker {
0885 Note: '''
0886 Tracks workers processing TF slices in the fast processing workflow.
0887 Records both active and inactive workers for historical analysis.
0888
0889
0890 *DB table: swf_workers*'''
0891
0892 worker_id char [pk, unique, not null]
0893 run_number integer [not null]
0894 panda_job char [not null]
0895 location char [not null]
0896 status char [not null]
0897 current_slice_id integer [null]
0898 tf_filename char [null]
0899 slices_completed integer [default:`0`, not null]
0900 last_heartbeat date_time [null]
0901 started_at date_time [not null]
0902 ended_at date_time [null]
0903 metadata json [null]
0904
0905 indexes {
0906 (worker_id) [pk, unique, name: 'swf_workers_pkey', type: btree]
0907 (run_number,status) [name: 'swf_workers_run_num_e495fa_idx', type: btree]
0908 (run_number) [name: 'swf_workers_run_number_e9d22704', type: btree]
0909 }
0910 }
0911
0912
0913 Table monitor_app.WorkflowDefinition {
0914 Note: '''
0915 Defines reusable workflow templates with parameters and execution logic.
0916
0917
0918 *DB table: swf_workflow_definitions*'''
0919
0920 id big_auto [pk, unique, not null]
0921 workflow_name char [note: '''Unique workflow name''', not null]
0922 version char [note: '''Version string''', not null]
0923 workflow_type char [note: '''Flexible workflow type classification''', not null]
0924 definition text [note: '''Python workflow code content''', not null]
0925 parameter_values json [note: '''Default parameter values and schema''', default:`builtins.dict()`, not null]
0926 created_by char [note: '''Username who created this workflow''', not null]
0927 created_at date_time [not null]
0928 updated_at date_time [not null]
0929
0930 indexes {
0931 (id) [pk, unique, name: 'swf_workflow_definitions_pkey', type: btree]
0932 (workflow_name,version) [unique, name: 'swf_workflow_definitions_workflow_name_version_c54e03fa_uniq', type: btree]
0933 }
0934 }
0935
0936
0937 Table monitor_app.WorkflowExecution {
0938 Note: '''
0939 Tracks individual workflow execution instances.
0940
0941
0942 *DB table: swf_workflow_executions*'''
0943
0944 execution_id char [note: '''Human-readable execution ID''', pk, unique, not null]
0945 workflow_definition_id foreign_key [not null]
0946 namespace char [note: '''Testbed namespace for workflow delineation''', null]
0947 parameter_values json [note: '''Actual parameter values used for this execution''', not null]
0948 performance_metrics json [note: '''Performance metrics and results''', null]
0949 status char [note: '''Flexible execution status''', default:`"pending"`, not null]
0950 start_time date_time [note: '''Execution start timestamp''', not null]
0951 end_time date_time [note: '''Execution completion timestamp''', null]
0952 executed_by char [note: '''Username who executed this workflow''', not null]
0953
0954 indexes {
0955 (namespace) [name: 'swf_workflow_executions_namespace_da80237b', type: btree]
0956 (execution_id) [pk, unique, name: 'swf_workflow_executions_pkey', type: btree]
0957 (workflow_definition_id) [name: 'swf_workflow_executions_workflow_definition_id_527d2e0a', type: btree]
0958 }
0959 }
0960 ref: monitor_app.WorkflowExecution.workflow_definition_id > monitor_app.WorkflowDefinition.id
0961
0962
0963 Table monitor_app.WorkflowMessage {
0964 Note: '''
0965 Tracks all messages exchanged in the workflow system.
0966
0967 Provides workflow-specific message tracking with agent identification and message type categorization.
0968
0969
0970 *DB table: swf_workflow_messages*'''
0971
0972 message_id uuid [pk, unique, default:`uuid.uuid4()`, not null]
0973 workflow_id foreign_key [null]
0974 stage_id foreign_key [null]
0975 message_type char [not null]
0976 request_id integer [null]
0977 sender_agent char [null]
0978 sender_type monitor_app.char_workflowmessage_sender_type [null]
0979 recipient_agent char [null]
0980 recipient_type monitor_app.char_workflowmessage_recipient_type [null]
0981 namespace char [note: '''Testbed namespace for multi-user message filtering''', null]
0982 execution_id char [note: '''Workflow execution instance ID''', null]
0983 run_id char [note: '''Run number within execution''', null]
0984 message_content json [not null]
0985 message_metadata json [note: '''Extensible metadata for monitoring, debugging, and system tracking''', default:`builtins.dict()`, null]
0986 sent_at date_time [not null]
0987 delivered_at date_time [null]
0988 acknowledged_at date_time [null]
0989 is_successful boolean [default:`None`, null]
0990 error_message text [null]
0991 queue_name char [null]
0992 correlation_id char [null]
0993
0994 indexes {
0995 (message_type,sent_at) [name: 'swf_workflo_message_cb52f7_idx', type: btree]
0996 (namespace,execution_id) [name: 'swf_workflo_namespa_5ae127_idx', type: btree]
0997 (namespace,run_id) [name: 'swf_workflo_namespa_dd7c26_idx', type: btree]
0998 (sender_agent,sent_at) [name: 'swf_workflo_sender__34fb10_idx', type: btree]
0999 (workflow_id,message_type) [name: 'swf_workflo_workflo_0fe275_idx', type: btree]
1000 (execution_id) [name: 'swf_workflow_messages_execution_id_79347dfb', type: btree]
1001 (namespace) [name: 'swf_workflow_messages_namespace_6ecc2826', type: btree]
1002 (message_id) [pk, unique, name: 'swf_workflow_messages_pkey', type: btree]
1003 (run_id) [name: 'swf_workflow_messages_run_id_132ff43b', type: btree]
1004 (stage_id) [name: 'swf_workflow_messages_stage_id_221b9ea1', type: btree]
1005 (workflow_id) [name: 'swf_workflow_messages_workflow_id_0515ebc8', type: btree]
1006 }
1007 }
1008 ref: monitor_app.WorkflowMessage.workflow_id > monitor_app.STFWorkflow.workflow_id
1009 ref: monitor_app.WorkflowMessage.stage_id > monitor_app.AgentWorkflowStage.stage_id
1010
1011
1012 Table sessions.Session {
1013 Note: '''
1014 Django provides full support for anonymous sessions. The session
1015 framework lets you store and retrieve arbitrary data on a
1016 per-site-visitor basis. It stores data on the server side and
1017 abstracts the sending and receiving of cookies. Cookies contain a
1018 session ID -- not the data itself.
1019
1020 The Django sessions framework is entirely cookie-based. It does
1021 not fall back to putting session IDs in URLs. This is an intentional
1022 design decision. Not only does that behavior make URLs ugly, it makes
1023 your site vulnerable to session-ID theft via the "Referer" header.
1024
1025 For complete documentation on using Sessions in your code, consult
1026 the sessions documentation that is shipped with Django (also available
1027 on the Django web site).
1028
1029
1030 *DB table: django_session*'''
1031
1032 session_key char [pk, unique, not null]
1033 session_data text [not null]
1034 expire_date date_time [not null]
1035
1036 indexes {
1037 (expire_date) [name: 'django_session_expire_date_a5c62663', type: btree]
1038 (session_key) [pk, unique, name: 'django_session_pkey', type: btree]
1039 }
1040 }
1041
1042