Example #1
0
        public ServerResponse ReturnFinishedJob(byte[] zippedBytes)
        {
            ServerResponse response = ServerResponse.ServerError;

            try
            {
                byte[]     recordBytes = RestAPI.Unzip(zippedBytes);
                HtmlRecord record      = BSON.Deserialize <HtmlRecord>(recordBytes);
                CrawlerManager.Instance.RemoveJob(record.recordid);
                DataManager.Instance.UpdateEntry(record);
                response = ServerResponse.Success;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.Print(ex.ToString());
                response = ServerResponse.ServerError;
            }
            return(response);
        }