Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|