lib/tasks/rebroadcast_pac_bio_multiple_requests_run.rake
# frozen_string_literal: true
namespace :pac_bio_run do
desc 'Update all PacBio runs in the warehouse where there is a duplicate for the index ' \
'[id_pac_bio_run_lims, well_label, comparable_tag_identifier, comparable_tag2_identifier]' \
' because there is more than one sequencing request for the run'
task rebroadcast_duplicates: :environment do
# This task resends messages
list_of_runs = [
10_056,
10_126,
10_138,
10_344,
10_502,
13_503,
13_791,
13_845,
13_846,
13_892,
13_946,
14_104,
14_202,
14_203,
14_282,
14_338,
14_401,
14_507,
15_065,
15_070,
15_076,
15_328,
15_349,
15_358,
15_506,
15_519,
15_546,
15_563,
15_597,
15_605,
15_799,
15_804,
15_834,
16_195,
16_200,
16_233,
16_292,
16_339,
16_549,
16_574,
16_624,
16_740,
16_829,
17_008,
17_052,
17_165,
17_561,
18_717,
18_731,
19_385,
20_495,
21_728,
25_860,
25_932,
26_035,
26_499,
26_620,
26_638,
27_294,
27_356,
28_237,
28_359,
28_400,
28_489,
28_562,
28_589,
28_613,
28_626,
28_681,
28_745,
29_062,
29_086,
29_116,
29_183,
30_058,
30_066,
30_172,
30_371,
30_450,
30_516,
30_532,
30_572,
31_108,
31_240,
31_701,
31_908,
31_911,
32_018,
32_068,
32_076,
32_169,
32_224,
32_274,
32_294,
32_334,
32_542,
32_583,
32_669,
32_685,
32_956,
33_029,
33_119,
33_157,
33_218,
33_266,
33_320,
33_367,
33_384,
33_397,
33_416,
33_450,
33_467,
33_574,
33_628,
33_655,
33_670,
33_746,
33_821,
33_841,
33_883,
33_962,
34_271,
34_386,
34_387,
34_410,
34_424,
34_463,
34_534,
34_576,
34_692,
34_806,
34_830,
34_992,
35_054,
35_086,
35_168,
35_226,
35_292,
35_332,
35_522,
35_605,
35_620,
35_716,
35_786,
35_796,
35_807,
35_860,
36_149,
36_184,
36_419,
36_590,
36_648,
36_849,
36_938,
36_974,
37_027,
37_173,
37_196,
58_882,
77_232,
90_227,
90_228,
90_259,
90_393,
90_404,
90_405,
90_449,
90_596,
90_633,
90_635,
90_770,
90_902,
90_903,
90_988,
90_991,
91_097,
91_098,
9990,
9992,
9993
]
Messenger.where(template: 'PacBioRunIO', target_id: list_of_runs).find_each(&:broadcast)
end
end