Ejemplo n.º 1
0
        public HttpStatusCodeResult Post([FromBody] CreatePackageRequest package)
        {
            var packageExists = nugetApi.GetPackage(package.Name);

            if (!packageExists)
            {
                return(new HttpStatusCodeResult(404));
            }
            EnsurePackageEntryExistsInDatabase(package);
            packageCrawlerJobQueue.EnqueueJob(package.Name);

            return(new HttpStatusCodeResult(200));
        }
Ejemplo n.º 2
0
 public void CrawlProject(string name)
 {
     this.downloader.Download(name)
     .Pipe(new NuspecParser().Parse)
     .DoTo(r => this.setQuery.Set(name, r), r => downloadStatsJobQueue.EnqueueJob(name));
 }
Ejemplo n.º 3
0
        public void InstallPackage(Package package)
        {
            var threadSafePackage = package.Clone();

            _jobQueue.EnqueueJob(_jobFactory.CreateJob("Installing Package: " + package.Name, () => PackageManager.InstallPackage(threadSafePackage)));
        }