mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
Injector fixes.
This commit is contained in:
parent
925fea29f4
commit
089b36e050
@ -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
|
||||
|
@ -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']}
|
||||
|
@ -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.
Loading…
Reference in New Issue
Block a user