@merkl/api 0.14.7 → 0.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,7 +41,7 @@ const extract = async () => {
|
|
41
41
|
}
|
42
42
|
catch (err) {
|
43
43
|
console.error(`Failed to insert a batch, adding it to the fail queue.\n${err}`);
|
44
|
-
failedBatches.push(data);
|
44
|
+
failedBatches.push([...data]);
|
45
45
|
data.length = 0;
|
46
46
|
}
|
47
47
|
}
|
@@ -109,7 +109,7 @@ export const main = async () => {
|
|
109
109
|
process.exit(1);
|
110
110
|
}
|
111
111
|
if (failedBatches.length === 0) {
|
112
|
-
await file.delete();
|
112
|
+
// await file.delete();
|
113
113
|
}
|
114
114
|
};
|
115
115
|
main();
|
@@ -105,7 +105,8 @@ export const main = async () => {
|
|
105
105
|
log.error("rewards", `${failedBatches.length} batches failed.`);
|
106
106
|
process.exit(1);
|
107
107
|
}
|
108
|
-
if (failedBatches.length === 0)
|
109
|
-
await file.delete();
|
108
|
+
if (failedBatches.length === 0) {
|
109
|
+
// await file.delete();
|
110
|
+
}
|
110
111
|
};
|
111
112
|
main();
|
@@ -6,7 +6,6 @@ import { OpportunityService } from "../opportunity";
|
|
6
6
|
import { InvalidParameter } from "../../../utils/error";
|
7
7
|
import { executeSimple } from "../../../utils/execute";
|
8
8
|
import { log } from "../../../utils/logger";
|
9
|
-
import { apiDbClient } from "../../../utils/prisma";
|
10
9
|
import { NETWORK_LABELS, } from "@sdk";
|
11
10
|
import { utils } from "ethers";
|
12
11
|
import moment from "moment";
|
@@ -152,17 +151,6 @@ export class CampaignService {
|
|
152
151
|
return await CampaignRepository.findUniqueOrThrow(id);
|
153
152
|
}
|
154
153
|
static async findCampaignsToProcess(distributionChainId) {
|
155
|
-
await apiDbClient.campaignStatus.updateMany({
|
156
|
-
data: {
|
157
|
-
status: "SUCCESS",
|
158
|
-
},
|
159
|
-
where: {
|
160
|
-
Campaign: {
|
161
|
-
distributionChainId: 324,
|
162
|
-
},
|
163
|
-
status: "PROCESSING",
|
164
|
-
},
|
165
|
-
});
|
166
154
|
return (await CampaignRepository.findCampaignsToProcess(distributionChainId)).filter(campaign => campaign.endTimestamp > campaign?.CampaignStatus?.[0]?.computedUntil);
|
167
155
|
}
|
168
156
|
static async findNextCampaignToProcess(chainId) {
|