summaryrefslogtreecommitdiff
path: root/mirrors/management
AgeCommit message (Collapse)Author
2010-12-13Move database interaction out of the threaded sectionDan McGee
We were seeing a lot of hangs and long-running never-ending processes. This might be due to some multithreading issues within Django, so move the save() calls to a loop after the join() on the threads doing the mirror polling. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13Mirror check script cleanupDan McGee
Don't import all the constants from logging, just use logging.* instead. Also, fix some typos that somehow snuck into one of my commits. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13Add mirrorresolv manage.py commandPyroPeter
Dan: * Fix up some style issues such as spacing between operators * Ensure one failed lookup doesn't crash the whole script * Be silent out of the box if there are no errors, just like mirrorcheck Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-11mirrorcheck: catch and handle another socket timeout caseDan McGee
We were seeing processes hang on the Arch server. It looks like there are ways for socket.timeout to come out of the main check code, so add another except block to catch this case. In addition, make sure we always call task_done() even on failures so processes eventually die. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-07mirrorcheck: record duration on file not found errorsDan McGee
On an HTTP 404, FTP 550, or inability to parse the lastsync file, record the duration of the check even though we couldn't get a time from the mirror. This allows for these checks to show up as completed but in error, which is more what. Previously, inability to parse the date was also recorded as a success, so change that to be a failure and record an error message with it. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Small updates to mirrorcheck commandDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Add debugger when having to parse lastsync fileDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21Add 'mirrorcheck' commandDan McGee
This does the actual work of going out and checking the mirror status. In short, it polls every active mirror URL for the 'lastsync' file and then records the appropriate details. These include the contents of that file, how long the total time to retrieve took, and any errors encountered. In order to finish up a bit faster, we spawn several threads to do the actual work. This parallelization allows the whole check process to take around 30 seconds rather than several minutes. Signed-off-by: Dan McGee <dan@archlinux.org>