Browse Source

py-i2phosts-fetcher: update last_success only after injector's run

pull/1/head
Hidden Z 14 years ago
parent
commit
50386d3f70
  1. 6
      py-i2phosts-fetcher

6
py-i2phosts-fetcher

@ -100,9 +100,6 @@ for source in all_sources: @@ -100,9 +100,6 @@ for source in all_sources:
if etag:
log.debug('%s ETag: %s', source.name, etag)
source.etag = etag
# update last_success
source.last_success = datetime.datetime.now()
source.save()
# form commnd-line for invoke injector
log.info('adding hosts from: %s', source.name)
sp_args = ['py-i2phosts-injector', '-s', '-a', '-f', tmpfile, '-d',
@ -112,3 +109,6 @@ for source in all_sources: @@ -112,3 +109,6 @@ for source in all_sources:
out = p.communicate()[0]
os.remove(tmpfile)
log.info('injector output: \n%s', out)
# update last_success
source.last_success = datetime.datetime.now()
source.save()

Loading…
Cancel
Save