timetable-mgr/cif
Fred Boniface dc958ac717 Set parsed to nil before exiting function 2024-04-13 21:44:53 +01:00
..
check.go Complete CIF Metadata parsing logic 2024-04-12 20:43:03 +01:00
constants.go Add LastUpdateType to CIF Metadata 2024-04-11 20:59:02 +01:00
convert.go Writing full CIF data now works. Still need to work on updating CIF data. 2024-04-08 21:08:07 +01:00
convert_test.go Writing full CIF data now works. Still need to work on updating CIF data. 2024-04-08 21:08:07 +01:00
helpers.go Remove unused functions 2024-04-10 22:59:13 +01:00
helpers_test.go Writing full CIF data now works. Still need to work on updating CIF data. 2024-04-08 21:08:07 +01:00
metadata.go Complete CIF Metadata parsing logic 2024-04-12 20:43:03 +01:00
parse.go Optimise batch size and stream handling 2024-04-11 20:50:13 +01:00
process.go Complete CIF Metadata parsing logic 2024-04-12 20:43:03 +01:00
process_test.go Writing full CIF data now works. Still need to work on updating CIF data. 2024-04-08 21:08:07 +01:00
readme.md Disable parsing of JSONAssociations as they are not currently used within OwlBoard 2024-04-10 21:47:08 +01:00
types.go Add comment description to cif/types.go 2024-04-11 21:06:23 +01:00
update.go Set parsed to nil before exiting function 2024-04-13 21:44:53 +01:00

readme.md

package cif

This package follows a similar pattern to package corpus.

First, CheckCorpus() retreived cif metadata from the database and determines whether an update is required and what type of update.

Then, one of the update functions is called which run through the update process. There are two update types, 'full' and 'update'. A 'full' update drops the entire timetable collection and rebuilds with a full CIF download. 'update' downloads CIF updates from specified days and applies updates.

Downloads are handled by package nrod which returns an io.ReadCloser which is passed to the parsing function.

Currently the parsing function returns a parsedCif pointer, however this is using significant memory due to the size of a full CIF download (Often around 4.5GB). The intention is to instead use a worker pool to handle the data.