Skip to content

Commit

Permalink
initdb
Browse files Browse the repository at this point in the history
  • Loading branch information
adenjonah committed May 22, 2024
1 parent fbb621a commit bc60bc3
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 1 deletion.
97 changes: 97 additions & 0 deletions server/initdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,108 @@
"description": "Ensure module installation is correctly performed; conduct systems check to verify functionality."
}
]
},
{
"id": 5,
"title": "Cable Repair",
"steps": [
{
"step": "COMM Tower Screen 1",
"role": "EV1",
"description": "Select Gear icon"
},
{
"step": "COMM Tower Screen 2",
"role": "EV1",
"description": "Select Shutdown"
},
{
"step": "COMM Tower Screen 3",
"role": "EV1",
"description": "Verify shutdown complete and notify EV2 and LMCC1"
},
{
"step": "MMRTG 4",
"role": "EV2",
"description": "Move POWER – OFF, notify EV1 and LMCC1"
},
{
"step": "MMRTG 5",
"role": "EV2",
"description": "Navigate to Comm Tower to retrieve one end of power cable"
},
{
"step": "Tool box 6",
"role": "EV1",
"description": "Retrieve spare cable"
},
{
"step": "MMRTG 7",
"role": "EV2",
"description": "Take appropriate end of cable to MMRTG, notify EV1 and LMCC1 when at MMRTG"
},
{
"step": "Comm Tower 8",
"role": "EV1",
"description": "Disconnect damaged cable from Comm Tower, notify EV2 and LMCC1"
},
{
"step": "MMRTG 9",
"role": "EV2",
"description": "Disconnect damaged cable from MMRTG, notify EV1 and LMCC1"
},
{
"step": "Comm Tower 10",
"role": "EV1",
"description": "Connect new cable from Comm Tower, notify EV2 and LMCC1"
},
{
"step": "MMRTG 11",
"role": "EV2",
"description": "Connect new cable from MMRTG, notify EV1 and LMCC1"
},
{
"step": "MMRTG 12",
"role": "EV2",
"description": "Move POWER – ON, notify EV1 and LMCC1"
},
{
"step": "Comm Tower 13",
"role": "EV1",
"description": "POWER – ON, notify EV2 and LMCC1"
},
{
"step": "Comm Tower 14",
"role": "EV1",
"description": "When start up complete, notify EV2 and LMCC1"
},
{
"step": "Comm Tower Screen 15",
"role": "EV1",
"description": "Verify channel “B” is operational, notify EV2 and LMCC1"
},
{
"step": "ALL DCU+LMCC 16",
"role": "LMCC1",
"description": "On LMCC1 Go, switch to COM – B"
},
{
"step": "ALL DCU+LMCC 17",
"role": "All",
"description": "Perform comm check"
},
{
"step": "ALL DCU+LMCC 18",
"role": "All",
"description": "If Comm good, EV1/LMCC1 switch back to COM-A, EV2/LMCC2 continue COM-B, else all to COM – A"
}
]
}
]
}



DEFAULT_ALERTS_DATA = {
"alerts": []
}
Expand Down
2 changes: 1 addition & 1 deletion server/json_databases/equipment_repair.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"procedures": [{"id": 1, "title": "Structural Damage Repair", "steps": [{"step": "Comm Tower Base 1", "role": "EV1", "description": "Collect structural repair materials including metal patches, welding tools, and adhesives."}, {"step": "Comm Tower Base 2", "role": "EV2", "description": "Assemble safety gear for climbing and securing both crew members."}, {"step": "Comm Tower 3", "role": "EV1", "description": "Assess tower for visible structural damage."}, {"step": "Comm Tower 4", "role": "EV2", "description": "Assist in removing debris and damaged components."}, {"step": "Comm Tower 5", "role": "EV1", "description": "Apply metal patches over holes or tears using welding tools."}, {"step": "Comm Tower 6", "role": "EV2", "description": "Provide support in applying patches or adhesives."}, {"step": "Comm Tower 7", "role": "EV1", "description": "Secure larger structural issues with adhesives and temporary supports."}, {"step": "Comm Tower 8", "role": "EV2", "description": "Ensure safety protocols are followed during high or difficult access points."}]}, {"id": 2, "title": "Power System Troubleshooting and Repair", "steps": [{"step": "Tower Base PSU 1", "role": "EV1", "description": "Assemble diagnostic kit, spare batteries, solar cells, and electrical repair tools."}, {"step": "Tower Base PSU 2", "role": "EV2", "description": "Carry additional spare parts and protective equipment."}, {"step": "Tower Base PSU 3", "role": "EV1", "description": "Perform diagnostics to identify power supply issues."}, {"step": "Tower Base PSU 4", "role": "EV2", "description": "Assist in identifying damaged components."}, {"step": "Tower Base PSU 5", "role": "EV1", "description": "Replace faulty batteries or solar cells."}, {"step": "Tower Base PSU 6", "role": "EV2", "description": "Help in repairing or replacing wiring, ensuring secure connections."}, {"step": "Tower Base PSU 7", "role": "EV1", "description": "Verify power system functionality post-repair."}]}, {"id": 3, "title": "Antenna Alignment and Calibration", "steps": [{"step": "Comm Tower Antenna 1", "role": "EV1", "description": "Prepare alignment tools and calibration software on a portable device."}, {"step": "Comm Tower Antenna 2", "role": "EV2", "description": "Assemble securing gear and safety equipment for both crew members."}, {"step": "Comm Tower Antenna 3", "role": "EV1", "description": "Adjust the antenna to correct orientation using tools."}, {"step": "Comm Tower Antenna 4", "role": "EV2", "description": "Assist in antenna inspection for misalignment or damage."}, {"step": "Comm Tower Antenna 5", "role": "EV1", "description": "Secure antenna position; perform calibration test."}, {"step": "Comm Tower Antenna 6", "role": "EV2", "description": "Support in adjustment and calibration process; maintain communication with mission control."}]}, {"id": 4, "title": "Transceiver Module Replacement", "steps": [{"step": "Comm Tower Transceiver 1", "role": "EV1", "description": "Collect replacement transceiver module and non-conductive tools."}, {"step": "Comm Tower Transceiver 2", "role": "EV2", "description": "Prepare electrostatic discharge safety equipment."}, {"step": "Comm Tower Transceiver 3", "role": "EV1", "description": "Remove the faulty module."}, {"step": "Comm Tower Transceiver 4", "role": "EV2", "description": "Assist in isolating power supply."}, {"step": "Comm Tower Transceiver 5", "role": "EV1", "description": "Install the new module ensuring all connections are secure."}, {"step": "Comm Tower Transceiver 6", "role": "EV2", "description": "Ensure module installation is correctly performed; conduct systems check to verify functionality."}]}]}
{"procedures": [{"id": 1, "title": "Structural Damage Repair", "steps": [{"step": "Comm Tower Base 1", "role": "EV1", "description": "Collect structural repair materials including metal patches, welding tools, and adhesives."}, {"step": "Comm Tower Base 2", "role": "EV2", "description": "Assemble safety gear for climbing and securing both crew members."}, {"step": "Comm Tower 3", "role": "EV1", "description": "Assess tower for visible structural damage."}, {"step": "Comm Tower 4", "role": "EV2", "description": "Assist in removing debris and damaged components."}, {"step": "Comm Tower 5", "role": "EV1", "description": "Apply metal patches over holes or tears using welding tools."}, {"step": "Comm Tower 6", "role": "EV2", "description": "Provide support in applying patches or adhesives."}, {"step": "Comm Tower 7", "role": "EV1", "description": "Secure larger structural issues with adhesives and temporary supports."}, {"step": "Comm Tower 8", "role": "EV2", "description": "Ensure safety protocols are followed during high or difficult access points."}]}, {"id": 2, "title": "Power System Troubleshooting and Repair", "steps": [{"step": "Tower Base PSU 1", "role": "EV1", "description": "Assemble diagnostic kit, spare batteries, solar cells, and electrical repair tools."}, {"step": "Tower Base PSU 2", "role": "EV2", "description": "Carry additional spare parts and protective equipment."}, {"step": "Tower Base PSU 3", "role": "EV1", "description": "Perform diagnostics to identify power supply issues."}, {"step": "Tower Base PSU 4", "role": "EV2", "description": "Assist in identifying damaged components."}, {"step": "Tower Base PSU 5", "role": "EV1", "description": "Replace faulty batteries or solar cells."}, {"step": "Tower Base PSU 6", "role": "EV2", "description": "Help in repairing or replacing wiring, ensuring secure connections."}, {"step": "Tower Base PSU 7", "role": "EV1", "description": "Verify power system functionality post-repair."}]}, {"id": 3, "title": "Antenna Alignment and Calibration", "steps": [{"step": "Comm Tower Antenna 1", "role": "EV1", "description": "Prepare alignment tools and calibration software on a portable device."}, {"step": "Comm Tower Antenna 2", "role": "EV2", "description": "Assemble securing gear and safety equipment for both crew members."}, {"step": "Comm Tower Antenna 3", "role": "EV1", "description": "Adjust the antenna to correct orientation using tools."}, {"step": "Comm Tower Antenna 4", "role": "EV2", "description": "Assist in antenna inspection for misalignment or damage."}, {"step": "Comm Tower Antenna 5", "role": "EV1", "description": "Secure antenna position; perform calibration test."}, {"step": "Comm Tower Antenna 6", "role": "EV2", "description": "Support in adjustment and calibration process; maintain communication with mission control."}]}, {"id": 4, "title": "Transceiver Module Replacement", "steps": [{"step": "Comm Tower Transceiver 1", "role": "EV1", "description": "Collect replacement transceiver module and non-conductive tools."}, {"step": "Comm Tower Transceiver 2", "role": "EV2", "description": "Prepare electrostatic discharge safety equipment."}, {"step": "Comm Tower Transceiver 3", "role": "EV1", "description": "Remove the faulty module."}, {"step": "Comm Tower Transceiver 4", "role": "EV2", "description": "Assist in isolating power supply."}, {"step": "Comm Tower Transceiver 5", "role": "EV1", "description": "Install the new module ensuring all connections are secure."}, {"step": "Comm Tower Transceiver 6", "role": "EV2", "description": "Ensure module installation is correctly performed; conduct systems check to verify functionality."}]}, {"id": 5, "title": "Cable Repair", "steps": [{"step": "COMM Tower Screen 1", "role": "EV1", "description": "Select Gear icon"}, {"step": "COMM Tower Screen 2", "role": "EV1", "description": "Select Shutdown"}, {"step": "COMM Tower Screen 3", "role": "EV1", "description": "Verify shutdown complete and notify EV2 and LMCC1"}, {"step": "MMRTG 4", "role": "EV2", "description": "Move POWER \u2013 OFF, notify EV1 and LMCC1"}, {"step": "MMRTG 5", "role": "EV2", "description": "Navigate to Comm Tower to retrieve one end of power cable"}, {"step": "Tool box 6", "role": "EV1", "description": "Retrieve spare cable"}, {"step": "MMRTG 7", "role": "EV2", "description": "Take appropriate end of cable to MMRTG, notify EV1 and LMCC1 when at MMRTG"}, {"step": "Comm Tower 8", "role": "EV1", "description": "Disconnect damaged cable from Comm Tower, notify EV2 and LMCC1"}, {"step": "MMRTG 9", "role": "EV2", "description": "Disconnect damaged cable from MMRTG, notify EV1 and LMCC1"}, {"step": "Comm Tower 10", "role": "EV1", "description": "Connect new cable from Comm Tower, notify EV2 and LMCC1"}, {"step": "MMRTG 11", "role": "EV2", "description": "Connect new cable from MMRTG, notify EV1 and LMCC1"}, {"step": "MMRTG 12", "role": "EV2", "description": "Move POWER \u2013 ON, notify EV1 and LMCC1"}, {"step": "Comm Tower 13", "role": "EV1", "description": "POWER \u2013 ON, notify EV2 and LMCC1"}, {"step": "Comm Tower 14", "role": "EV1", "description": "When start up complete, notify EV2 and LMCC1"}, {"step": "Comm Tower Screen 15", "role": "EV1", "description": "Verify channel \u201cB\u201d is operational, notify EV2 and LMCC1"}, {"step": "ALL DCU+LMCC 16", "role": "LMCC1", "description": "On LMCC1 Go, switch to COM \u2013 B"}, {"step": "ALL DCU+LMCC 17", "role": "All", "description": "Perform comm check"}, {"step": "ALL DCU+LMCC 18", "role": "All", "description": "If Comm good, EV1/LMCC1 switch back to COM-A, EV2/LMCC2 continue COM-B, else all to COM \u2013 A"}]}]}
1 change: 1 addition & 0 deletions server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def initialize_files():
@app.on_event("startup")
async def startup_event():
initialize_files() # Ensure files are created if they do not exist
initialize_database_files()
scheduler = AsyncIOScheduler()
scheduler.add_job(periodic_fetch_and_store, 'interval', seconds=10) # Adjust the interval as needed
scheduler.start()
Expand Down

0 comments on commit bc60bc3

Please sign in to comment.