Injector fixes.

This commit is contained in:
Zak Betz 2015-10-20 17:01:05 -06:00
parent 925fea29f4
commit 089b36e050
4 changed files with 5 additions and 4 deletions

View File

@ -3724,7 +3724,8 @@ bool XmlDoc::indexWarcOrArc ( ) {
// if WARC-Type: is not response, skip it. so if it
// is a revisit then skip it i guess.
if ( strncmp ( warcType,"response", 8 ) != 0 ) {
if ( strncmp ( warcType,"response", 8 ) != 0 &&
strncmp ( warcType,"revisit", 7 ) != 0) {
//log("build: was not type response");
// read another warc record

View File

@ -108,7 +108,7 @@ def injectItem(item, db, mode):
skipped = 0
warcs = filter(lambda x: 'name' in x and x['name'].endswith and x['name'].endswith('arc.gz'), md['files'])
collectionName = metadata.get('archiveit-collection-name', '')
collectionName = md.get('archiveit-collection-name', '')
for ii, ff in enumerate(warcs):
#if not ff['name'].endswith('arc.gz'): continue
itemMetadata = {'mtime':ff['mtime']}

View File

@ -28,8 +28,8 @@ class ItemsNamespace(BaseNamespace, BroadcastMixin):
@staticmethod
def sendItems():
while True:
if len(ItemsNamespace.AllConnected) == 0:
return
# if len(ItemsNamespace.AllConnected) == 0:
# return
item = itemEvent.get()
for x in ItemsNamespace.AllConnected:
x.emit('update', item)

Binary file not shown.