mirror of https://github.com/CIRCL/AIL-framework
cleanup, add FIXME
parent
63b29176c1
commit
277d138a5d
|
@ -84,11 +84,12 @@ if __name__ == "__main__":
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# FIXME do it in the paste class
|
||||||
lines_infos = PST.get_lines_info()
|
lines_infos = PST.get_lines_info()
|
||||||
|
|
||||||
PST.save_attribute_redis("p_nb_lines", lines_infos[0])
|
PST.save_attribute_redis("p_nb_lines", lines_infos[0])
|
||||||
PST.save_attribute_redis("p_max_length_line", lines_infos[1])
|
PST.save_attribute_redis("p_max_length_line", lines_infos[1])
|
||||||
|
|
||||||
|
# FIXME Not used.
|
||||||
PST.store.sadd("Pastes_Objects", PST.p_path)
|
PST.store.sadd("Pastes_Objects", PST.p_path)
|
||||||
if lines_infos[1] >= args.max:
|
if lines_infos[1] >= args.max:
|
||||||
h.pub_channel = channel_0
|
h.pub_channel = channel_0
|
||||||
|
|
|
@ -62,17 +62,14 @@ if __name__ == "__main__":
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
encoding = PST._get_p_encoding()
|
# FIXME do it directly in the class
|
||||||
language = PST._get_p_language()
|
PST.save_attribute_redis("p_encoding", PST._get_p_encoding())
|
||||||
|
PST.save_attribute_redis("p_language", PST._get_p_language())
|
||||||
PST.save_attribute_redis("p_encoding", encoding)
|
# FIXME why not all saving everything there.
|
||||||
PST.save_attribute_redis("p_language", language)
|
|
||||||
|
|
||||||
PST.store.sadd("Pastes_Objects", PST.p_path)
|
|
||||||
|
|
||||||
PST.save_all_attributes_redis()
|
PST.save_all_attributes_redis()
|
||||||
|
# FIXME Not used.
|
||||||
|
PST.store.sadd("Pastes_Objects", PST.p_path)
|
||||||
except IOError:
|
except IOError:
|
||||||
print "CRC Checksum Failed on :", PST.p_path
|
print "CRC Checksum Failed on :", PST.p_path
|
||||||
publisher.error('{0};{1};{2};{3};{4}'.format(
|
publisher.error('Duplicate;{};{};{};CRC Checksum Failed'.format(
|
||||||
"Duplicate", PST.p_source, PST.p_date, PST.p_name,
|
PST.p_source, PST.p_date, PST.p_name))
|
||||||
"CRC Checksum Failed"))
|
|
||||||
|
|
Loading…
Reference in New Issue