Move code snipper to its own directory

Because our main composer has php engine specified as 5.6
we cannot use tools and libraries dependent on php 7

[MAILPOET-2090]
This commit is contained in:
Pavel Dohnal
2019-05-20 11:31:10 +02:00
committed by M. Shull
parent 99817cf5a4
commit fcf5fe1d5d
8 changed files with 379 additions and 258 deletions

View File

@ -260,8 +260,7 @@ class Import {
);
if (!$existing_trashed_records) return;
$existing_trashed_records = Helpers::flattenArray($existing_trashed_records);
foreach (array_chunk($existing_trashed_records, self::DB_QUERY_CHUNK_SIZE) as
$subscriber_ids) {
foreach (array_chunk($existing_trashed_records, self::DB_QUERY_CHUNK_SIZE) as $subscriber_ids) {
Subscriber::whereIn('id', $subscriber_ids)
->deleteMany();
SubscriberSegment::whereIn('subscriber_id', $subscriber_ids)