52 |
# check-latest |
# check-latest |
53 |
import requests |
import requests |
54 |
|
|
55 |
|
import multiprocessing |
56 |
|
|
57 |
SLEEP_INITIAL=180 |
SLEEP_INITIAL=180 |
58 |
SLEEP_REPEAT=30 |
SLEEP_REPEAT=30 |
59 |
SLEEP_TIMES=30 |
SLEEP_TIMES=30 |
676 |
fdst.flush() |
fdst.flush() |
677 |
os.rename(fdst.name, path) |
os.rename(fdst.name, path) |
678 |
|
|
679 |
|
def cmd_co_multi(l): |
680 |
|
package, module, package_version, spec_version, downstream_files = l |
681 |
|
|
682 |
|
print "%s => %s" % (module, package) |
683 |
|
try: |
684 |
|
Downstream.co(package) |
685 |
|
except subprocess.CalledProcessError: |
686 |
|
pass |
687 |
|
|
688 |
def cmd_co(options, parser): |
def cmd_co(options, parser): |
689 |
for package, module, package_version, spec_version, downstream_files in sorted(join_streams()): |
p = multiprocessing.Pool(5) |
690 |
print "%s => %s" % (module, package) |
p.map(cmd_co_multi, sorted(join_streams())) |
|
try: |
|
|
Downstream.co(package) |
|
|
except subprocess.CalledProcessError: |
|
|
pass |
|
691 |
|
|
692 |
def join_streams(show_version=False, only_diff_version=False): |
def join_streams(show_version=False, only_diff_version=False): |
693 |
root = os.path.expanduser(Downstream.PKGROOT) |
root = os.path.expanduser(Downstream.PKGROOT) |