Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisassad committed Oct 15, 2024
1 parent 233d25f commit 3c1a29b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@hicommonwealth/model';
import type { Requirement } from '@hicommonwealth/shared';
import moment from 'moment';
import { FindOptions, Op, Sequelize } from 'sequelize';
import { FindOptions, Op } from 'sequelize';
import { config } from '../../config';

/**
Expand Down Expand Up @@ -117,6 +117,9 @@ export async function refreshMembershipsForAddress(
),
);

console.log('memberships bulk create');
console.log(toBulkCreate);
console.log('======');
await models.Membership.bulkCreate(toBulkCreate, {
updateOnDuplicate: ['reject_reason', 'last_checked'],
logging: true,
Expand Down Expand Up @@ -150,6 +153,6 @@ function computeMembership(
group_id: group.id!,
address_id: address.id!,
reject_reason: isValid ? null : messages,
last_checked: Sequelize.literal('CURRENT_TIMESTAMP') as any,
last_checked: new Date(),
};
}

0 comments on commit 3c1a29b

Please sign in to comment.